class FastMappingList<S,E> extends MappingList<S,E>
MappingList
with a cache so that each list element gets mapped only once. This assumes that the
original adapted list does not change (neither the size
nor its elements
).Modifier and Type | Field and Description |
---|---|
private Object[] |
cache |
modCount
Constructor and Description |
---|
FastMappingList(List<S> list,
Function<S,E> mapper)
The constructor.
|
Modifier and Type | Method and Description |
---|---|
E |
get(int index) |
size
add, add, addAll, clear, equals, hashCode, indexOf, iterator, lastIndexOf, listIterator, listIterator, remove, removeRange, set, subList
addAll, contains, containsAll, isEmpty, remove, removeAll, retainAll, toArray, toArray, toString
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
addAll, contains, containsAll, isEmpty, remove, removeAll, replaceAll, retainAll, sort, spliterator, toArray, toArray
parallelStream, removeIf, stream
private final Object[] cache
Copyright © 2001–2016 mmm-Team. All rights reserved.