|
common-util | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectlocal.tomas.util.collections.MappedList<F,T>
F - original element typeT - mapped element typepublic class MappedList<F,T>
Mapped list. A mapped list maps the elements of the base list through a mapping.
| Field Summary | |
|---|---|
protected List<F> |
list
|
protected ObjectMapping<T> |
mapping
|
| Constructor Summary | |
|---|---|
MappedList(List<F> list,
ObjectMapping<T> mapping)
Construct a mapped list. |
|
| Method Summary | ||
|---|---|---|
void |
add(int index,
T element)
|
|
boolean |
add(T o)
|
|
boolean |
addAll(Collection<? extends T> c)
|
|
boolean |
addAll(int index,
Collection<? extends T> c)
|
|
void |
clear()
|
|
boolean |
contains(Object o)
|
|
boolean |
containsAll(Collection<?> c)
|
|
T |
get(int index)
|
|
List<F> |
getList()
Get base list. |
|
ObjectMapping<T> |
getMapping()
Get mapping. |
|
int |
indexOf(Object o)
|
|
boolean |
isEmpty()
|
|
Iterator<T> |
iterator()
|
|
int |
lastIndexOf(Object o)
|
|
ListIterator<T> |
listIterator()
|
|
ListIterator<T> |
listIterator(int index)
|
|
T |
remove(int index)
|
|
boolean |
remove(Object o)
|
|
boolean |
removeAll(Collection<?> c)
|
|
boolean |
retainAll(Collection<?> c)
|
|
T |
set(int index,
T element)
|
|
void |
setList(List<F> list)
Set base list. |
|
void |
setMapping(ObjectMapping<T> mapping)
Set mapping. |
|
int |
size()
|
|
void |
sort(Comparator<F> comparator)
|
|
List<T> |
subList(int fromIndex,
int toIndex)
|
|
Object[] |
toArray()
|
|
|
toArray(X[] a)
|
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface java.util.List |
|---|
equals, hashCode |
| Field Detail |
|---|
protected List<F> list
protected ObjectMapping<T> mapping
| Constructor Detail |
|---|
public MappedList(List<F> list,
ObjectMapping<T> mapping)
list - base listmapping - mapping| Method Detail |
|---|
public List<F> getList()
public void setList(List<F> list)
list - The list to set.public ObjectMapping<T> getMapping()
public void setMapping(ObjectMapping<T> mapping)
mapping - The mapping to set.public void sort(Comparator<F> comparator)
public int size()
size in interface Collection<T>size in interface List<T>public boolean isEmpty()
isEmpty in interface Collection<T>isEmpty in interface List<T>public boolean contains(Object o)
contains in interface Collection<T>contains in interface List<T>public Iterator<T> iterator()
iterator in interface Iterable<T>iterator in interface Collection<T>iterator in interface List<T>public Object[] toArray()
toArray in interface Collection<T>toArray in interface List<T>public <X> X[] toArray(X[] a)
toArray in interface Collection<T>toArray in interface List<T>public boolean add(T o)
add in interface Collection<T>add in interface List<T>public boolean remove(Object o)
remove in interface Collection<T>remove in interface List<T>public boolean containsAll(Collection<?> c)
containsAll in interface Collection<T>containsAll in interface List<T>public boolean addAll(Collection<? extends T> c)
addAll in interface Collection<T>addAll in interface List<T>UnsupportedOperationException - when invoked.
public boolean addAll(int index,
Collection<? extends T> c)
addAll in interface List<T>UnsupportedOperationException - when invoked.public boolean removeAll(Collection<?> c)
removeAll in interface Collection<T>removeAll in interface List<T>UnsupportedOperationException - when invoked.public boolean retainAll(Collection<?> c)
retainAll in interface Collection<T>retainAll in interface List<T>UnsupportedOperationException - when invoked.public void clear()
clear in interface Collection<T>clear in interface List<T>UnsupportedOperationException - when invoked.public T get(int index)
get in interface List<T>
public T set(int index,
T element)
set in interface List<T>UnsupportedOperationException - when invoked.
public void add(int index,
T element)
add in interface List<T>UnsupportedOperationException - when invoked.public T remove(int index)
remove in interface List<T>UnsupportedOperationException - when invoked.public int indexOf(Object o)
indexOf in interface List<T>public int lastIndexOf(Object o)
lastIndexOf in interface List<T>public ListIterator<T> listIterator()
listIterator in interface List<T>public ListIterator<T> listIterator(int index)
listIterator in interface List<T>
public List<T> subList(int fromIndex,
int toIndex)
subList in interface List<T>
|
common-util | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||