Module org.jhotdraw8.icollection
Package org.jhotdraw8.icollection.facade
Class ReadOnlySortedSetFacade<E>
java.lang.Object
org.jhotdraw8.icollection.readonly.AbstractReadOnlyCollection<E>
org.jhotdraw8.icollection.readonly.AbstractReadOnlySet<E>
org.jhotdraw8.icollection.facade.ReadOnlySetFacade<E>
org.jhotdraw8.icollection.facade.ReadOnlySortedSetFacade<E>
- Type Parameters:
E- the element type
- All Implemented Interfaces:
Iterable<E>,ReadOnlyCollection<E>,ReadOnlySequencedCollection<E>,ReadOnlySequencedSet<E>,ReadOnlySet<E>,ReadOnlySortedSet<E>
public class ReadOnlySortedSetFacade<E>
extends ReadOnlySetFacade<E>
implements ReadOnlySortedSet<E>
Provides a
ReadOnlySortedSet facade to a set of SortedSet functions.- Author:
- Werner Randelshofer
-
Field Summary
Fields inherited from class org.jhotdraw8.icollection.facade.ReadOnlySetFacade
characteristics, containsFunction, iteratorFunction, sizeFunction -
Constructor Summary
ConstructorsConstructorDescriptionReadOnlySortedSetFacade(Supplier<Iterator<E>> iteratorFunction, Supplier<Iterator<E>> reverseIteratorFunction, IntSupplier sizeFunction, Predicate<Object> containsFunction, Supplier<E> getFirstFunction, Supplier<E> getLastFunction, Supplier<Comparator<? super E>> comparatorSupplier, int characteristics) -
Method Summary
Modifier and TypeMethodDescription@Nullable Comparator<? super E> Returns the comparator used to order the elements in this set, ornullif this set uses the natural ordering of its elements.getLast()Gets the last element.Returns a reversed-order view of this set.Methods inherited from class org.jhotdraw8.icollection.facade.ReadOnlySetFacade
contains, hashCode, iterator, size, spliteratorMethods inherited from class org.jhotdraw8.icollection.readonly.AbstractReadOnlySet
equalsMethods 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 java.lang.Iterable
forEach, spliteratorMethods inherited from interface org.jhotdraw8.icollection.readonly.ReadOnlyCollection
contains, containsAll, isEmpty, iterator, size, stream, toArray, toArrayMethods inherited from interface org.jhotdraw8.icollection.readonly.ReadOnlySequencedCollection
asCollection, getFirstMethods inherited from interface org.jhotdraw8.icollection.readonly.ReadOnlySequencedSet
asSetMethods inherited from interface org.jhotdraw8.icollection.readonly.ReadOnlySet
characteristics, equals, hashCode
-
Constructor Details
-
ReadOnlySortedSetFacade
-
ReadOnlySortedSetFacade
public ReadOnlySortedSetFacade(Supplier<Iterator<E>> iteratorFunction, Supplier<Iterator<E>> reverseIteratorFunction, IntSupplier sizeFunction, Predicate<Object> containsFunction, Supplier<E> getFirstFunction, Supplier<E> getLastFunction, Supplier<Comparator<? super E>> comparatorSupplier, int characteristics)
-
-
Method Details
-
comparator
Description copied from interface:ReadOnlySortedSetReturns the comparator used to order the elements in this set, ornullif this set uses the natural ordering of its elements.- Specified by:
comparatorin interfaceReadOnlySortedSet<E>- Returns:
- comparator or null
-
getLast
Description copied from interface:ReadOnlySequencedCollectionGets the last element.- Specified by:
getLastin interfaceReadOnlySequencedCollection<E>- Returns:
- an element
-
readOnlyReversed
Description copied from interface:ReadOnlySequencedSetReturns a reversed-order view of this set. Changes to the underlying set are visible in the reversed view.- Specified by:
readOnlyReversedin interfaceReadOnlySequencedCollection<E>- Specified by:
readOnlyReversedin interfaceReadOnlySequencedSet<E>- Returns:
- a reversed-order view of this set
-