|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjava.util.AbstractCollection<E>
java.util.AbstractList<E>
net.sf.molae.pipe.trafo.IndexTransformedList<E>
public class IndexTransformedList<E>
A list which permutes the elements of a base list. Permutation is described by a transformer.
| Field Summary |
|---|
| Fields inherited from class java.util.AbstractList |
|---|
modCount |
| Constructor Summary | |
|---|---|
IndexTransformedList(List<E> base,
int[] mapping)
Constructs a IndexTransformdList object. |
|
IndexTransformedList(List<E> base,
IntTransformer transformer)
Constructs a IndexTransformdList object. |
|
| Method Summary | |
|---|---|
void |
clear()
Removes all of the elements from this collection (optional operation). |
E |
get(int index)
Returns the element at the specified position in this list. |
E |
set(int index,
E element)
Replaces the element at the specified position in this list with the specified element (optional operation). |
int |
size()
Returns the number of elements in this list. |
| Methods inherited from class java.util.AbstractList |
|---|
add, add, addAll, equals, hashCode, indexOf, iterator, lastIndexOf, listIterator, listIterator, remove, removeRange, subList |
| Methods inherited from class java.util.AbstractCollection |
|---|
addAll, contains, containsAll, isEmpty, remove, removeAll, retainAll, toArray, toArray, toString |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface java.util.List |
|---|
addAll, contains, containsAll, isEmpty, remove, removeAll, retainAll, toArray, toArray |
| Constructor Detail |
|---|
public IndexTransformedList(List<E> base,
IntTransformer transformer)
base - the underling lists where the elements are stored.transformer - describes the index mapping
public IndexTransformedList(List<E> base,
int[] mapping)
base - the underling lists where the elements are stored.mapping - describes the index mapping| Method Detail |
|---|
public int size()
size in interface Collection<E>size in interface List<E>size in class AbstractCollection<E>public void clear()
clear in interface Collection<E>clear in interface List<E>clear in class AbstractList<E>UnsupportedOperationException - if the clear method
is not supported by the base listpublic E get(int index)
get in interface List<E>get in class AbstractList<E>index - index of element to return.
IndexOutOfBoundsException - if the given index is out of range
(index < 0 || index >= size()).
public E set(int index,
E element)
This implementation replaces the element at the transformed input index in the base list.
set in interface List<E>set in class AbstractList<E>index - index of element to replace.element - element to be stored at the specified position.
UnsupportedOperationException - if the set method is not
supported by the base list.
ClassCastException - if the class of the specified element
prevents it from being added to the base list.
IllegalArgumentException - if some aspect of the specified
element prevents it from being added to the base list.
IndexOutOfBoundsException - if the specified index is out of
range (index < 0 || index >= size()).
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||