EDU.oswego.cs.dl.util.concurrent
public class SyncSortedSet extends SyncSet implements java.util.SortedSet
SyncCollection
SyncCollection.SyncCollectionIterator
c_, rd_, syncFailures_, wr_
Constructor and Description |
---|
SyncSortedSet(java.util.SortedSet set,
ReadWriteLock rwl)
Create a new SyncSortedSet protecting the given set,
and using the given ReadWriteLock to control reader and writer methods.
|
SyncSortedSet(java.util.SortedSet set,
Sync sync)
Create a new SyncSortedSet protecting the given collection,
and using the given sync to control both reader and writer methods.
|
SyncSortedSet(java.util.SortedSet set,
Sync readLock,
Sync writeLock)
Create a new SyncSortedSet protecting the given set,
and using the given pair of locks to control reader and writer methods.
|
Modifier and Type | Method and Description |
---|---|
protected java.util.SortedSet |
baseSortedSet() |
java.util.Comparator |
comparator() |
java.lang.Object |
first() |
java.util.SortedSet |
headSet(java.lang.Object toElement) |
java.lang.Object |
last() |
java.util.SortedSet |
subSet(java.lang.Object fromElement,
java.lang.Object toElement) |
java.util.SortedSet |
tailSet(java.lang.Object fromElement) |
add, addAll, afterRead, beforeRead, clear, contains, containsAll, isEmpty, iterator, readerSync, remove, removeAll, retainAll, size, syncFailures, toArray, toArray, unprotectedIterator, writerSync
public SyncSortedSet(java.util.SortedSet set, Sync sync)
public SyncSortedSet(java.util.SortedSet set, ReadWriteLock rwl)
protected java.util.SortedSet baseSortedSet()
public java.util.Comparator comparator()
comparator
in interface java.util.SortedSet
public java.lang.Object first()
first
in interface java.util.SortedSet
public java.lang.Object last()
last
in interface java.util.SortedSet
public java.util.SortedSet subSet(java.lang.Object fromElement, java.lang.Object toElement)
subSet
in interface java.util.SortedSet
public java.util.SortedSet headSet(java.lang.Object toElement)
headSet
in interface java.util.SortedSet
public java.util.SortedSet tailSet(java.lang.Object fromElement)
tailSet
in interface java.util.SortedSet