Class SyncSortedSet
java.lang.Object
EDU.oswego.cs.dl.util.concurrent.SyncCollection
EDU.oswego.cs.dl.util.concurrent.SyncSet
EDU.oswego.cs.dl.util.concurrent.SyncSortedSet
- All Implemented Interfaces:
Iterable, Collection, SequencedCollection, SequencedSet, Set, SortedSet
SyncSortedSets wrap Sync-based control around java.util.SortedSets.
They support the following additional reader operations over
SyncCollection: comparator, subSet, headSet, tailSet, first, last.
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class SyncCollection
SyncCollection.SyncCollectionIterator -
Field Summary
Fields inherited from class SyncCollection
c_, rd_, syncFailures_, wr_ -
Constructor Summary
ConstructorsConstructorDescriptionSyncSortedSet(SortedSet set, ReadWriteLock rwl) Create a new SyncSortedSet protecting the given set, and using the given ReadWriteLock to control reader and writer methods.SyncSortedSet(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(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. -
Method Summary
Methods inherited from class SyncCollection
add, addAll, afterRead, beforeRead, clear, contains, containsAll, isEmpty, iterator, readerSync, remove, removeAll, retainAll, size, syncFailures, toArray, toArray, unprotectedIterator, writerSyncMethods inherited from class Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface Collection
parallelStream, removeIf, stream, toArrayMethods inherited from interface Set
add, addAll, clear, contains, containsAll, equals, hashCode, isEmpty, iterator, remove, removeAll, retainAll, size, toArray, toArrayMethods inherited from interface SortedSet
addFirst, addLast, getFirst, getLast, removeFirst, removeLast, reversed, spliterator
-
Constructor Details
-
SyncSortedSet
-
SyncSortedSet
Create a new SyncSortedSet protecting the given set, and using the given ReadWriteLock to control reader and writer methods. -
SyncSortedSet
-
-
Method Details
-
baseSortedSet
-
comparator
- Specified by:
comparatorin interfaceSortedSet
-
first
-
last
-
subSet
-
headSet
-
tailSet
-