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 boolean
add(E element)
boolean
addAll(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:ForwardingObject
Returns 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:
delegate
in classForwardingSortedSet<E>
-
headSet
public java.util.SortedSet<E> headSet(E toElement)
- Specified by:
headSet
in interfacejava.util.SortedSet<E>
- Overrides:
headSet
in classForwardingSortedSet<E>
-
subSet
public java.util.SortedSet<E> subSet(E fromElement, E toElement)
- Specified by:
subSet
in interfacejava.util.SortedSet<E>
- Overrides:
subSet
in classForwardingSortedSet<E>
-
tailSet
public java.util.SortedSet<E> tailSet(E fromElement)
- Specified by:
tailSet
in interfacejava.util.SortedSet<E>
- Overrides:
tailSet
in classForwardingSortedSet<E>
-
add
public boolean add(E element)
- Specified by:
add
in interfacejava.util.Collection<E>
- Specified by:
add
in interfacejava.util.Set<E>
- Overrides:
add
in classForwardingCollection<E>
-
-