ch.elca.el4j.util.collections
Interface TransformedList<I,O>
- Type Parameters:
I
- the backing list's element typeO
- this list's element type
- All Superinterfaces:
- Collection<O>, ExtendedList<O>, ExtendedReorderableList<O>, Iterable<O>, List<O>, RandomAccess
- All Known Implementing Classes:
- DefaultTransformedList
public interface TransformedList<I,O>
- extends ExtendedReorderableList<O>
A view for a list where every element appears transformed. That is, if
source
is the backing list and function
the element
transformation function,
this.get(i)
returns the same value as
function.apply(source.get(i))
for any i < source.size()
.
Element order is taken from the source list. By consequence, changing
this list's element order changes the source list's element order.
This view is read-only, i.e. its modifying operations throw
an UnsupportedOperationException.
- Author:
- Adrian Moos (AMS)
- File-location:
- TransformedList
- Last check-in date:
- 2009-08-04 15:48:31 +0200 (Di, 04. Aug 2009) by swismer for revision 3884
Methods inherited from interface java.util.List |
add, add, addAll, addAll, clear, contains, containsAll, equals, get, hashCode, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, retainAll, set, size, subList, toArray, toArray |
getBacking
List<? extends I> getBacking()
- returns the backing list.
- Returns:
- the backing list.
Copyright © 2005-2011 ELCA. All Rights Reserved.