public class SynchronizedSortedSet extends SynchronizedCollection implements SortedSet
SortedSet
to synchronize its behaviour
for a multi-threaded environment.
Methods are synchronized, then forwarded to the decorated set.
This class is Serializable from Commons Collections 3.1.
collection, lock
Modifier | Constructor and Description |
---|---|
protected |
SynchronizedSortedSet(SortedSet set)
Constructor that wraps (not copies).
|
protected |
SynchronizedSortedSet(SortedSet set,
Object lock)
Constructor that wraps (not copies).
|
Modifier and Type | Method and Description |
---|---|
Comparator |
comparator() |
static SortedSet |
decorate(SortedSet set)
Factory method to create a synchronized set.
|
Object |
first() |
protected SortedSet |
getSortedSet()
Gets the decorated set.
|
SortedSet |
headSet(Object toElement) |
Object |
last() |
SortedSet |
subSet(Object fromElement,
Object toElement) |
SortedSet |
tailSet(Object fromElement) |
add, addAll, clear, contains, containsAll, decorate, equals, hashCode, isEmpty, iterator, remove, removeAll, retainAll, size, toArray, toArray, toString
protected SynchronizedSortedSet(SortedSet set)
set
- the set to decorate, must not be nullIllegalArgumentException
- if set is nullprotected SynchronizedSortedSet(SortedSet set, Object lock)
set
- the set to decorate, must not be nulllock
- the lock object to use, must not be nullIllegalArgumentException
- if set is nullpublic static SortedSet decorate(SortedSet set)
set
- the set to decorate, must not be nullIllegalArgumentException
- if set is nullprotected SortedSet getSortedSet()
public Comparator comparator()
comparator
in interface SortedSet
Copyright © 2001–2015 The Apache Software Foundation. All rights reserved.