Module org.jhotdraw8.icollection
Package org.jhotdraw8.icollection.facade
Class ReadOnlySequencedCollectionFacade<E>
java.lang.Object
org.jhotdraw8.icollection.readonly.AbstractReadOnlyCollection<E>
org.jhotdraw8.icollection.facade.ReadOnlyCollectionFacade<E>
org.jhotdraw8.icollection.facade.ReadOnlySequencedCollectionFacade<E>
- Type Parameters:
E- the element type
- All Implemented Interfaces:
Iterable<E>,ReadOnlyCollection<E>,ReadOnlySequencedCollection<E>
public class ReadOnlySequencedCollectionFacade<E>
extends ReadOnlyCollectionFacade<E>
implements ReadOnlySequencedCollection<E>
Provides a
ReadOnlySequencedSet facade to a set of Set functions.- Author:
- Werner Randelshofer
-
Field Summary
Fields inherited from class org.jhotdraw8.icollection.facade.ReadOnlyCollectionFacade
characteristics, containsFunction, iteratorFunction, sizeFunction -
Constructor Summary
ConstructorsConstructorDescriptionReadOnlySequencedCollectionFacade(@NonNull Supplier<Iterator<E>> iteratorFunction, @NonNull Supplier<Iterator<E>> reverseIteratorFunction, @NonNull IntSupplier sizeFunction, @NonNull Predicate<Object> containsFunction, @NonNull Supplier<E> getFirstFunction, @NonNull Supplier<E> getLastFunction, int spliteratorCharacteristics) -
Method Summary
Methods inherited from class org.jhotdraw8.icollection.facade.ReadOnlyCollectionFacade
contains, equals, hashCode, iterator, sizeMethods 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, contains, containsAll, isEmpty, iterator, size, stream, toArray, toArrayMethods inherited from interface org.jhotdraw8.icollection.readonly.ReadOnlySequencedCollection
asCollection
-
Constructor Details
-
ReadOnlySequencedCollectionFacade
-
ReadOnlySequencedCollectionFacade
public ReadOnlySequencedCollectionFacade(@NonNull Supplier<Iterator<E>> iteratorFunction, @NonNull Supplier<Iterator<E>> reverseIteratorFunction, @NonNull IntSupplier sizeFunction, @NonNull Predicate<Object> containsFunction, @NonNull Supplier<E> getFirstFunction, @NonNull Supplier<E> getLastFunction, int spliteratorCharacteristics)
-
-
Method Details
-
spliterator
- Specified by:
spliteratorin interfaceIterable<E>- Overrides:
spliteratorin classReadOnlyCollectionFacade<E>
-
getFirst
Description copied from interface:ReadOnlySequencedCollectionGets the first element.- Specified by:
getFirstin interfaceReadOnlySequencedCollection<E>- Returns:
- an element
-
getLast
Description copied from interface:ReadOnlySequencedCollectionGets the last element.- Specified by:
getLastin interfaceReadOnlySequencedCollection<E>- Returns:
- an element
-
readOnlyReversed
Description copied from interface:ReadOnlySequencedCollectionReturns a reversed-order view of this collection. Changes to the underlying collection are visible in the reversed view.- Specified by:
readOnlyReversedin interfaceReadOnlySequencedCollection<E>- Returns:
- a reversed-order view of this collection
-