Module org.jhotdraw8.collection
Package org.jhotdraw8.collection.mapped
Class MappedReadOnlyList<E,F>
java.lang.Object
org.jhotdraw8.icollection.readonly.AbstractReadOnlyCollection<E>
org.jhotdraw8.icollection.readonly.AbstractReadOnlyList<E>
org.jhotdraw8.collection.mapped.MappedReadOnlyList<E,F>
- Type Parameters:
E- the mapped element typeF- the original element type
- All Implemented Interfaces:
Iterable<E>,ReadOnlyCollection<E>,ReadOnlyList<E>,ReadOnlySequencedCollection<E>
Maps a
ReadOnlyList to a different element type.
The underlying List is referenced - not copied.
- Author:
- Werner Randelshofer
-
Constructor Summary
ConstructorsConstructorDescriptionMappedReadOnlyList(@NonNull ReadOnlyList<F> backingList, @NonNull Function<F, E> mapf) -
Method Summary
Modifier and TypeMethodDescriptionbooleanget(int index) iterator()readOnlySubList(int fromIndex, int toIndex) intsize()Methods inherited from class org.jhotdraw8.icollection.readonly.AbstractReadOnlyList
equals, hashCodeMethods inherited from class org.jhotdraw8.icollection.readonly.AbstractReadOnlyCollection
toStringMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.jhotdraw8.icollection.readonly.ReadOnlyCollection
characteristics, containsAll, isEmpty, stream, toArray, toArrayMethods inherited from interface org.jhotdraw8.icollection.readonly.ReadOnlyList
asList, getFirst, getLast, getLast, indexOf, lastIndexOf, listIterator, listIterator, peekFirst, peekLastMethods inherited from interface org.jhotdraw8.icollection.readonly.ReadOnlySequencedCollection
asCollection
-
Constructor Details
-
MappedReadOnlyList
-
-
Method Details
-
contains
- Specified by:
containsin interfaceReadOnlyCollection<E>- Overrides:
containsin classAbstractReadOnlyCollection<E>
-
get
-
iterator
-
readOnlyReversed
-
spliterator
-
size
public int size() -
readOnlySubList
-