Package com.google.common.collect
Class Constraints.ConstrainedSortedSet<E>
- java.lang.Object
-
- com.google.common.collect.ForwardingObject
-
- com.google.common.collect.ForwardingCollection<E>
-
- com.google.common.collect.ForwardingSet<E>
-
- com.google.common.collect.ForwardingSortedSet<E>
-
- com.google.common.collect.Constraints.ConstrainedSortedSet<E>
-
- All Implemented Interfaces:
java.lang.Iterable<E>,java.util.Collection<E>,java.util.Set<E>,java.util.SortedSet<E>
- Enclosing class:
- Constraints
private static class Constraints.ConstrainedSortedSet<E> extends ForwardingSortedSet<E>
-
-
Field Summary
Fields Modifier and Type Field Description (package private) Constraint<? super E>constraint(package private) java.util.SortedSet<E>delegate
-
Constructor Summary
Constructors Constructor Description ConstrainedSortedSet(java.util.SortedSet<E> delegate, Constraint<? super E> constraint)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanadd(E element)booleanaddAll(java.util.Collection<? extends E> elements)protected java.util.SortedSet<E>delegate()Returns the backing delegate instance that methods are forwarded to.java.util.SortedSet<E>headSet(E toElement)java.util.SortedSet<E>subSet(E fromElement, E toElement)java.util.SortedSet<E>tailSet(E fromElement)-
Methods inherited from class com.google.common.collect.ForwardingSortedSet
comparator, first, last, standardContains, standardRemove, standardSubSet
-
Methods inherited from class com.google.common.collect.ForwardingSet
equals, hashCode, standardEquals, standardHashCode, standardRemoveAll
-
Methods inherited from class com.google.common.collect.ForwardingCollection
clear, contains, containsAll, isEmpty, iterator, remove, removeAll, retainAll, size, standardAddAll, standardClear, standardContainsAll, standardIsEmpty, standardRetainAll, standardToArray, standardToArray, standardToString, toArray, toArray
-
Methods inherited from class com.google.common.collect.ForwardingObject
toString
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
-
-
-
Field Detail
-
delegate
final java.util.SortedSet<E> delegate
-
constraint
final Constraint<? super E> constraint
-
-
Constructor Detail
-
ConstrainedSortedSet
ConstrainedSortedSet(java.util.SortedSet<E> delegate, Constraint<? super E> constraint)
-
-
Method Detail
-
delegate
protected java.util.SortedSet<E> delegate()
Description copied from class:ForwardingObjectReturns the backing delegate instance that methods are forwarded to. Abstract subclasses generally override this method with an abstract method that has a more specific return type, such asForwardingSet.delegate(). Concrete subclasses override this method to supply the instance being decorated.- Specified by:
delegatein classForwardingSortedSet<E>
-
headSet
public java.util.SortedSet<E> headSet(E toElement)
- Specified by:
headSetin interfacejava.util.SortedSet<E>- Overrides:
headSetin classForwardingSortedSet<E>
-
subSet
public java.util.SortedSet<E> subSet(E fromElement, E toElement)
- Specified by:
subSetin interfacejava.util.SortedSet<E>- Overrides:
subSetin classForwardingSortedSet<E>
-
tailSet
public java.util.SortedSet<E> tailSet(E fromElement)
- Specified by:
tailSetin interfacejava.util.SortedSet<E>- Overrides:
tailSetin classForwardingSortedSet<E>
-
add
public boolean add(E element)
- Specified by:
addin interfacejava.util.Collection<E>- Specified by:
addin interfacejava.util.Set<E>- Overrides:
addin classForwardingCollection<E>
-
-