Module org.jhotdraw8.icollection
Package org.jhotdraw8.icollection.facade
Class ReadOnlyNavigableSetFacade<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.ReadOnlyNavigableSetFacade<E>
- Type Parameters:
E- the element type
- All Implemented Interfaces:
Iterable<E>,ReadOnlyCollection<E>,ReadOnlyNavigableSet<E>,ReadOnlySequencedCollection<E>,ReadOnlySequencedSet<E>,ReadOnlySet<E>,ReadOnlySortedSet<E>
public class ReadOnlyNavigableSetFacade<E>
extends ReadOnlySetFacade<E>
implements ReadOnlyNavigableSet<E>
Provides a
ReadOnlyNavigableSet facade to a set of NavigableSet functions.- Author:
- Werner Randelshofer
-
Field Summary
Fields inherited from class org.jhotdraw8.icollection.facade.ReadOnlySetFacade
characteristics, containsFunction, iteratorFunction, sizeFunction -
Constructor Summary
ConstructorsConstructorDescriptionReadOnlyNavigableSetFacade(Supplier<Iterator<E>> iteratorFunction, Supplier<Iterator<E>> reverseIteratorFunction, IntSupplier sizeFunction, Predicate<Object> containsFunction, Supplier<E> getFirstFunction, Supplier<E> getLastFunction, Function<E, E> ceilingFunction, Function<E, E> floorFunction, Function<E, E> higherFunction, Function<E, E> lowerFunction, Supplier<Comparator<? super E>> comparatorSupplier, int characteristics) -
Method Summary
Modifier and TypeMethodDescription@Nullable EReturns the least element in this set greater than or equal to the given element, or null if there is no such element.@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.@Nullable EReturns the greatest element in this set less than or equal to the given element, or null if there is no such element.getFirst()Gets the first element.getLast()Gets the last element.@Nullable EReturns the least element in this set greater than the given element, or null if there is no such element.@Nullable EReturns the greatest element in this set less than the given element, or null if there is no such 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
asCollectionMethods inherited from interface org.jhotdraw8.icollection.readonly.ReadOnlySequencedSet
asSetMethods inherited from interface org.jhotdraw8.icollection.readonly.ReadOnlySet
characteristics, equals, hashCode
-
Constructor Details
-
ReadOnlyNavigableSetFacade
public ReadOnlyNavigableSetFacade(Supplier<Iterator<E>> iteratorFunction, Supplier<Iterator<E>> reverseIteratorFunction, IntSupplier sizeFunction, Predicate<Object> containsFunction, Supplier<E> getFirstFunction, Supplier<E> getLastFunction, Function<E, E> ceilingFunction, Function<E, E> floorFunction, Function<E, E> higherFunction, Function<E, E> lowerFunction, Supplier<Comparator<? super E>> comparatorSupplier, int characteristics)
-
Method Details
-
ceiling
Description copied from interface:ReadOnlyNavigableSetReturns the least element in this set greater than or equal to the given element, or null if there is no such element.- Specified by:
ceilingin interfaceReadOnlyNavigableSet<E>- Parameters:
e- the given element- Returns:
- ceiling element or null
-
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
-
floor
Description copied from interface:ReadOnlyNavigableSetReturns the greatest element in this set less than or equal to the given element, or null if there is no such element.- Specified by:
floorin interfaceReadOnlyNavigableSet<E>- Parameters:
e- the given element- Returns:
- floor element or null
-
higher
Description copied from interface:ReadOnlyNavigableSetReturns the least element in this set greater than the given element, or null if there is no such element.- Specified by:
higherin interfaceReadOnlyNavigableSet<E>- Parameters:
e- the given element- Returns:
- higher element or null
-
lower
Description copied from interface:ReadOnlyNavigableSetReturns the greatest element in this set less than the given element, or null if there is no such element.- Specified by:
lowerin interfaceReadOnlyNavigableSet<E>- Parameters:
e- the given element- Returns:
- lower element or null
-
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: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
-