Class PredicatedNavigableSet<E>
java.lang.Object
org.apache.commons.collections4.collection.AbstractCollectionDecorator<E>
org.apache.commons.collections4.collection.PredicatedCollection<E>
org.apache.commons.collections4.set.PredicatedSet<E>
org.apache.commons.collections4.set.PredicatedSortedSet<E>
org.apache.commons.collections4.set.PredicatedNavigableSet<E>
- Type Parameters:
- E- the type of the elements in this set
- All Implemented Interfaces:
- Serializable,- Iterable<E>,- Collection<E>,- NavigableSet<E>,- Set<E>,- SortedSet<E>
Decorates another 
NavigableSet to validate that all additions
 match a specified predicate.
 This set exists to provide validation for the decorated set. It is normally created to decorate an empty set. If an object cannot be added to the set, an IllegalArgumentException is thrown.
One usage would be to ensure that no null entries are added to the set.
 NavigableSet set =
   PredicatedSortedSet.predicatedNavigableSet(new TreeSet(),
                                              NotNullPredicate.notNullPredicate());
 - Since:
- 4.1
- See Also:
- 
Nested Class SummaryNested classes/interfaces inherited from class org.apache.commons.collections4.collection.PredicatedCollectionPredicatedCollection.Builder<E>
- 
Field SummaryFields inherited from class org.apache.commons.collections4.collection.PredicatedCollectionpredicate
- 
Constructor SummaryConstructorsModifierConstructorDescriptionprotectedPredicatedNavigableSet(NavigableSet<E> set, Predicate<? super E> predicate) Constructor that wraps (not copies).
- 
Method SummaryModifier and TypeMethodDescriptionprotected NavigableSet<E> Gets the navigable set being decorated.pollLast()static <E> PredicatedNavigableSet<E> predicatedNavigableSet(NavigableSet<E> set, Predicate<? super E> predicate) Factory method to create a predicated (validating) navigable set.Methods inherited from class org.apache.commons.collections4.set.PredicatedSortedSetcomparator, first, headSet, last, predicatedSortedSet, subSet, tailSetMethods inherited from class org.apache.commons.collections4.set.PredicatedSetequals, hashCode, predicatedSetMethods inherited from class org.apache.commons.collections4.collection.PredicatedCollectionadd, addAll, builder, notNullBuilder, predicatedCollection, validateMethods inherited from class org.apache.commons.collections4.collection.AbstractCollectionDecoratorclear, contains, containsAll, isEmpty, iterator, remove, removeAll, removeIf, retainAll, setCollection, size, toArray, toArray, toStringMethods inherited from class java.lang.Objectclone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface java.util.CollectionparallelStream, removeIf, streamMethods inherited from interface java.util.NavigableSetheadSet, iterator, subSet, tailSetMethods inherited from interface java.util.Setadd, addAll, clear, contains, containsAll, equals, hashCode, isEmpty, remove, removeAll, retainAll, size, toArray, toArrayMethods inherited from interface java.util.SortedSetcomparator, first, last, spliterator
- 
Constructor Details
- 
Method Details
- 
ceiling
- 
decoratedGets the navigable set being decorated.- Overrides:
- decoratedin class- PredicatedSortedSet<E>
- Returns:
- the decorated navigable set
 
- 
descendingIterator- Specified by:
- descendingIteratorin interface- NavigableSet<E>
 
- 
descendingSet- Specified by:
- descendingSetin interface- NavigableSet<E>
 
- 
floor
- 
headSet- Specified by:
- headSetin interface- NavigableSet<E>
 
- 
higher
- 
lower
- 
pollFirst- Specified by:
- pollFirstin interface- NavigableSet<E>
 
- 
pollLast- Specified by:
- pollLastin interface- NavigableSet<E>
 
- 
subSetpublic NavigableSet<E> subSet(E fromElement, boolean fromInclusive, E toElement, boolean toInclusive) - Specified by:
- subSetin interface- NavigableSet<E>
 
- 
tailSet- Specified by:
- tailSetin interface- NavigableSet<E>