java.lang.Object
java.util.AbstractCollection<E>
java.util.AbstractList<E>
org.jhotdraw8.icollection.facade.ListFacade<E>
- Type Parameters:
E- the element type
- All Implemented Interfaces:
Iterable<E>,Collection<E>,List<E>,SequencedCollection<E>
Provides a
List facade to a set of List functions.- Author:
- Werner Randelshofer
-
Field Summary
Fields inherited from class java.util.AbstractList
modCount -
Constructor Summary
ConstructorsConstructorDescriptionListFacade(IntSupplier sizeFunction, IntFunction<E> getFunction) ListFacade(IntSupplier sizeFunction, IntFunction<E> getFunction, @Nullable Runnable clearFunction, @Nullable BiConsumer<Integer, E> addFunction, @Nullable IntFunction<E> removeFunction) ListFacade(List<E> backingList) ListFacade(ReadOnlyList<E> backingList) -
Method Summary
Methods inherited from class java.util.AbstractList
add, add, addAll, clear, equals, hashCode, indexOf, iterator, lastIndexOf, listIterator, listIterator, removeRange, set, subListMethods inherited from class java.util.AbstractCollection
addAll, contains, containsAll, isEmpty, remove, removeAll, retainAll, toArray, toArray, toStringMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface java.util.Collection
parallelStream, removeIf, toArrayMethods inherited from interface java.util.List
addAll, contains, containsAll, getFirst, getLast, isEmpty, remove, removeAll, removeFirst, removeLast, replaceAll, retainAll, sort, toArray, toArray
-
Constructor Details
-
ListFacade
-
ListFacade
-
ListFacade
-
ListFacade
public ListFacade(IntSupplier sizeFunction, IntFunction<E> getFunction, @Nullable Runnable clearFunction, @Nullable BiConsumer<Integer, E> addFunction, @Nullable IntFunction<E> removeFunction)
-
-
Method Details
-
get
-
spliterator
- Specified by:
spliteratorin interfaceCollection<E>- Specified by:
spliteratorin interfaceIterable<E>- Specified by:
spliteratorin interfaceList<E>
-
remove
-
size
public int size()- Specified by:
sizein interfaceCollection<E>- Specified by:
sizein interfaceList<E>- Specified by:
sizein classAbstractCollection<E>
-
addFirst
-
addLast
-
stream
- Specified by:
streamin interfaceCollection<E>
-
reversed
-