Class java.util.Collections.UnmodifiableSortedSet
java.lang.Object
|
+--java.util.Collections.UnmodifiableCollection
|
+--java.util.Collections.UnmodifiableSet
|
+--java.util.Collections.UnmodifiableSortedSet
- static class Collections.UnmodifiableSortedSet
- extends Collections.UnmodifiableSet
- implements SortedSet, java.io.Serializable
- See Also:
- Serialized Form
Methods inherited from class java.util.Collections.UnmodifiableCollection |
addAll, add, clear, containsAll, contains, isEmpty, iterator, removeAll, remove, retainAll, size, toArray, toArray |
Methods inherited from class java.lang.Object |
, clone, equals, finalize, getClass, hashCode, notifyAll, notify, toString, wait, wait, wait |
Collections.UnmodifiableSortedSet
Collections.UnmodifiableSortedSet(SortedSet s)
comparator
public Comparator comparator()
- Description copied from interface:
Returns the Comparator associated with this SortedSet, or null
if it uses its elements' natural ordering.
- Specified by:
- comparator in interface SortedSet
subSet
public SortedSet subSet(java.lang.Object fromElement,
java.lang.Object toElement)
- Description copied from interface:
Returns a view of the portion of this SortedSet whose elements range
from fromElement, inclusive, to toElement, exclusive. The returned
SortedSet is backed by this SortedSet, so changes in the returned
SortedSet are reflected in this SortedSet, and vice-versa. The
returned Set supports all optional Set operations.
The Set returned by this method will throw an IllegalArgumentException
if the user attempts to insert a element outside the specified range.
- Specified by:
- subSet in interface SortedSet
headSet
public SortedSet headSet(java.lang.Object toElement)
- Description copied from interface:
Returns a view of the portion of this SortedSet whose elements are
strictly less than toElement. The returned SortedSet is backed by this
SortedSet, so changes in the returned SortedSet are reflected in this
SortedSet, and vice-versa. The returned Set supports all optional Set
operations.
The Set returned by this method will throw an IllegalArgumentException
if the user attempts to insert a element outside the specified range.
- Specified by:
- headSet in interface SortedSet
tailSet
public SortedSet tailSet(java.lang.Object fromElement)
- Description copied from interface:
Returns a view of the portion of this SortedSet whose elements are
greater than or equal to fromElement. The returned SortedSet is
backed by this SortedSet, so changes in the returned SortedSet are
reflected in this SortedSet, and vice-versa. The returned Set
supports all optional Set operations.
The Set returned by this method will throw an IllegalArgumentException
if the user attempts to insert a element outside the specified range.
- Specified by:
- tailSet in interface SortedSet
first
public java.lang.Object first()
- Description copied from interface:
Returns the first (lowest) element currently in this SortedSet.
- Specified by:
- first in interface SortedSet
last
public java.lang.Object last()
- Description copied from interface:
Returns the last (highest) element currently in this SortedSet.
- Specified by:
- last in interface SortedSet