java.util
Class Collections.SynchronizedSortedSet<E>
java.lang.Object
java.util.Collections.SynchronizedCollection<E>
java.util.Collections.SynchronizedSet<E>
java.util.Collections.SynchronizedSortedSet<E>
- All Implemented Interfaces:
- Serializable, Iterable<E>, Collection<E>, Set<E>, SortedSet<E>
- Enclosing class:
- Collections
static class Collections.SynchronizedSortedSet<E>
- extends Collections.SynchronizedSet<E>
- implements SortedSet<E>
|
Method Summary |
Comparator<? super E> |
comparator()
Returns the Comparator used to compare elements in this SortedSet. |
E |
first()
Answer the first sorted element in this SortedSet. |
SortedSet<E> |
headSet(E end)
Returns a SortedSet of the specified portion of this SortedSet which
contains elements less than the end element. |
E |
last()
Answer the last sorted element in this SortedSet. |
SortedSet<E> |
subSet(E start,
E end)
Returns a SortedSet of the specified portion of this SortedSet which
contains elements greater or equal to the start element but less than the
end element. |
SortedSet<E> |
tailSet(E start)
Returns a SortedSet of the specified portion of this SortedSet which
contains elements greater or equal to the start element. |
| Methods inherited from class java.util.Collections.SynchronizedCollection |
add, addAll, clear, contains, containsAll, isEmpty, iterator, remove, removeAll, retainAll, size, toArray, toArray, toString |
| Methods inherited from interface java.util.Set |
add, addAll, clear, contains, containsAll, equals, hashCode, isEmpty, iterator, remove, removeAll, retainAll, size, toArray, toArray |
Collections.SynchronizedSortedSet
Collections.SynchronizedSortedSet(SortedSet<E> set)
Collections.SynchronizedSortedSet
Collections.SynchronizedSortedSet(SortedSet<E> set,
Object mutex)
comparator
public Comparator<? super E> comparator()
- Description copied from interface:
SortedSet
- Returns the Comparator used to compare elements in this SortedSet.
- Specified by:
comparator in interface SortedSet<E>
- Returns:
- a Comparator or null if the natural order is used
first
public E first()
- Description copied from interface:
SortedSet
- Answer the first sorted element in this SortedSet.
- Specified by:
first in interface SortedSet<E>
- Returns:
- the first sorted element
headSet
public SortedSet<E> headSet(E end)
- Description copied from interface:
SortedSet
- Returns a SortedSet of the specified portion of this SortedSet which
contains elements less than the end element. The returned SortedSet is
backed by this SortedSet so changes to one are reflected by the other.
- Specified by:
headSet in interface SortedSet<E>
- Parameters:
end - the end element
- Returns:
- a subset where the elements are less than
end
last
public E last()
- Description copied from interface:
SortedSet
- Answer the last sorted element in this SortedSet.
- Specified by:
last in interface SortedSet<E>
- Returns:
- the last sorted element
subSet
public SortedSet<E> subSet(E start,
E end)
- Description copied from interface:
SortedSet
- Returns a SortedSet of the specified portion of this SortedSet which
contains elements greater or equal to the start element but less than the
end element. The returned SortedSet is backed by this SortedMap so
changes to one are reflected by the other.
- Specified by:
subSet in interface SortedSet<E>
- Parameters:
start - the start elementend - the end element
- Returns:
- a subset where the elements are greater or equal to
start and less than end
tailSet
public SortedSet<E> tailSet(E start)
- Description copied from interface:
SortedSet
- Returns a SortedSet of the specified portion of this SortedSet which
contains elements greater or equal to the start element. The returned
SortedSet is backed by this SortedSet so changes to one are reflected by
the other.
- Specified by:
tailSet in interface SortedSet<E>
- Parameters:
start - the start element
- Returns:
- a subset where the elements are greater or equal to
start
Please submit a feedback, bug or feature