Module org.jhotdraw8.icollection
Package org.jhotdraw8.icollection.facade
Class SequencedCollectionFacade<E>
java.lang.Object
java.util.AbstractCollection<E>
org.jhotdraw8.icollection.facade.CollectionFacade<E>
org.jhotdraw8.icollection.facade.SequencedCollectionFacade<E>
- Type Parameters:
E- the element type
- All Implemented Interfaces:
Iterable<E>,Collection<E>,SequencedCollection<E>,ReadOnlyCollection<E>
public class SequencedCollectionFacade<E>
extends CollectionFacade<E>
implements SequencedCollection<E>
Provides a
SequencedCollection facade to a set of Collection functions.- Author:
- Werner Randelshofer
-
Field Summary
Fields inherited from class org.jhotdraw8.icollection.facade.CollectionFacade
addFunction, clearFunction, containsFunction, iteratorFunction, removeFunction, sizeFunction, spliteratorFunction -
Constructor Summary
ConstructorsConstructorDescriptionSequencedCollectionFacade(Collection<E> backingCollection, Supplier<Iterator<E>> reverseIteratorFunction) SequencedCollectionFacade(Supplier<Iterator<E>> iteratorFunction, Supplier<Iterator<E>> reverseIteratorFunction, IntSupplier sizeFunction, Predicate<Object> containsFunction) SequencedCollectionFacade(Supplier<Iterator<E>> iteratorFunction, Supplier<Iterator<E>> reverseIteratorFunction, IntSupplier sizeFunction, Predicate<Object> containsFunction, @Nullable Runnable clearFunction, @Nullable Predicate<Object> removeFunction, @Nullable Supplier<E> getFirstFunction, @Nullable Supplier<E> getLastFunction, @Nullable Consumer<E> addFirstFunction, @Nullable Consumer<E> addLastFunction, @Nullable Predicate<E> addFunction) SequencedCollectionFacade(ReadOnlyCollection<E> backingCollection, Supplier<Iterator<E>> reverseIteratorFunction) SequencedCollectionFacade(ReadOnlySequencedCollection<E> backingCollection) -
Method Summary
Methods inherited from class org.jhotdraw8.icollection.facade.CollectionFacade
add, clear, contains, iterator, remove, size, streamMethods inherited from class java.util.AbstractCollection
addAll, containsAll, isEmpty, removeAll, retainAll, toArray, toArray, toStringMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface java.util.Collection
add, addAll, clear, contains, containsAll, equals, hashCode, isEmpty, iterator, parallelStream, remove, removeAll, removeIf, retainAll, size, stream, toArray, toArray, toArrayMethods inherited from interface org.jhotdraw8.icollection.readonly.ReadOnlyCollection
asCollection, characteristics, containsAll, isEmpty, toArray, toArrayMethods inherited from interface java.util.SequencedCollection
removeFirst, removeLast
-
Constructor Details
-
SequencedCollectionFacade
-
SequencedCollectionFacade
public SequencedCollectionFacade(ReadOnlyCollection<E> backingCollection, Supplier<Iterator<E>> reverseIteratorFunction) -
SequencedCollectionFacade
public SequencedCollectionFacade(Collection<E> backingCollection, Supplier<Iterator<E>> reverseIteratorFunction) -
SequencedCollectionFacade
-
SequencedCollectionFacade
public SequencedCollectionFacade(Supplier<Iterator<E>> iteratorFunction, Supplier<Iterator<E>> reverseIteratorFunction, IntSupplier sizeFunction, Predicate<Object> containsFunction, @Nullable Runnable clearFunction, @Nullable Predicate<Object> removeFunction, @Nullable Supplier<E> getFirstFunction, @Nullable Supplier<E> getLastFunction, @Nullable Consumer<E> addFirstFunction, @Nullable Consumer<E> addLastFunction, @Nullable Predicate<E> addFunction)
-
-
Method Details
-
addFirst
- Specified by:
addFirstin interfaceSequencedCollection<E>
-
addLast
- Specified by:
addLastin interfaceSequencedCollection<E>
-
getFirst
- Specified by:
getFirstin interfaceSequencedCollection<E>
-
getLast
- Specified by:
getLastin interfaceSequencedCollection<E>
-
reversed
- Specified by:
reversedin interfaceSequencedCollection<E>
-
spliterator
- Specified by:
spliteratorin interfaceCollection<E>- Specified by:
spliteratorin interfaceIterable<E>- Overrides:
spliteratorin classCollectionFacade<E>
-