Package com.tangosol.util
Class RestrictedCollections.RestrictedSortedSet
- java.lang.Object
-
- com.tangosol.util.Base
-
- com.tangosol.util.RestrictedCollections.RestrictedCollection
-
- com.tangosol.util.RestrictedCollections.RestrictedSet
-
- com.tangosol.util.RestrictedCollections.RestrictedSortedSet
-
- All Implemented Interfaces:
Serializable
,Iterable
,Collection
,Set
,SortedSet
- Enclosing class:
- RestrictedCollections
public static class RestrictedCollections.RestrictedSortedSet extends RestrictedCollections.RestrictedSet implements SortedSet, Serializable
A restricted Set that requires its contents to be of a specified class.- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.tangosol.util.Base
Base.LoggingWriter
-
-
Field Summary
-
Fields inherited from class com.tangosol.util.RestrictedCollections.RestrictedCollection
m_clz, m_col
-
-
Constructor Summary
Constructors Constructor Description RestrictedSortedSet(SortedSet set, Class clz)
Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Comparator
comparator()
Returns the comparator associated with this sorted set, or null if it uses its elements' natural ordering.Object
first()
Returns the first (lowest) element currently in this sorted set.SortedSet
headSet(Object toElement)
Returns a view of the portion of this sorted set whose elements are strictly less than toElement.Object
last()
Returns the last (highest) element currently in this sorted set.SortedSet
subSet(Object fromElement, Object toElement)
Returns a view of the portion of this sorted set whose elements range from fromElement, inclusive, to toElement, exclusive.SortedSet
tailSet(Object fromElement)
Returns a view of the portion of this sorted set whose elements are greater than or equal to fromElement.-
Methods inherited from class com.tangosol.util.RestrictedCollections.RestrictedCollection
add, addAll, checkObject, clear, contains, containsAll, equals, hashCode, isEmpty, iterator, remove, removeAll, retainAll, size, toArray, toArray, toString
-
Methods inherited from class com.tangosol.util.Base
azzert, azzert, azzert, azzertFailed, breakLines, breakLines, capitalize, checkNotEmpty, checkNotNull, checkRange, computeSafeWaitTime, decimalValue, dup, dup, ensureBigDecimal, ensureClassLoader, ensureRuntimeException, ensureRuntimeException, equals, equalsDeep, err, err, err, err, err, escape, formatDateTime, getCallerStackFrame, getCommonMonitor, getCommonMonitor, getCommonMonitor, getContextClassLoader, getContextClassLoader, getDeepMessage, getErr, getLastSafeTimeMillis, getLog, getMaxDecDigits, getMaxHexDigits, getOriginalException, getOut, getProcessRandom, getRandom, getRandomBinary, getRandomBinary, getRandomString, getSafeTimeMillis, getStackFrame, getStackFrames, getStackTrace, getStackTrace, getStackTrace, getThreadFactory, getTimeZone, getUpTimeMillis, hashCode, hexValue, indentString, indentString, isDecimal, isHex, isLogEcho, isOctal, log, log, log, log, log, makeInteger, makeLong, makeThread, mergeArray, mergeBooleanArray, mergeByteArray, mergeCharArray, mergeDoubleArray, mergeFloatArray, mergeIntArray, mergeLongArray, mod, mod, octalValue, out, out, out, out, out, pad, parseBandwidth, parseBandwidth, parseDelimitedString, parseHex, parseHex, parseMemorySize, parseMemorySize, parsePercentage, parseTime, parseTime, parseTimeNanos, parseTimeNanos, printStackTrace, randomize, randomize, randomize, randomize, read, read, read, read, read, read, read, replace, setErr, setLog, setLogEcho, setOut, sleep, toBandwidthString, toBandwidthString, toCharEscape, toCrc, toCrc, toCrc, toCrc, toCrc, toDecString, toDelimitedString, toDelimitedString, toDelimitedString, toDelimitedString, toHex, toHex, toHexDump, toHexEscape, toHexEscape, toHexEscape, toHexEscape, toHexString, toMemorySizeString, toMemorySizeString, toQuotedCharEscape, toQuotedStringEscape, toSqlString, toString, toString, toStringEscape, toUnicodeEscape, trace, trace, trace, trace, trace, trace, trace, trace, trace, truncateString, truncateString, wait
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface java.util.Collection
parallelStream, removeIf, stream, toArray
-
Methods inherited from interface java.util.Set
add, addAll, clear, contains, containsAll, equals, hashCode, isEmpty, iterator, remove, removeAll, retainAll, size, toArray, toArray
-
Methods inherited from interface java.util.SortedSet
spliterator
-
-
-
-
Method Detail
-
comparator
public Comparator comparator()
Returns the comparator associated with this sorted set, or null if it uses its elements' natural ordering.- Specified by:
comparator
in interfaceSortedSet
- Returns:
- the comparator associated with this sorted set, or null if it uses its elements' natural ordering
-
subSet
public SortedSet subSet(Object fromElement, Object toElement)
Returns a view of the portion of this sorted set whose elements range from fromElement, inclusive, to toElement, exclusive. (If fromElement and toElement are equal, the returned sorted set is empty.) The returned sorted set is backed by this sorted set, so changes in the returned sorted set are reflected in this sorted set, and vice-versa. The returned sorted set supports all optional set operations that this sorted set supports.Obeys the general contract of SortedSet.subSet.
-
headSet
public SortedSet headSet(Object toElement)
Returns a view of the portion of this sorted set whose elements are strictly less than toElement. The returned sorted set is backed by this sorted set, so changes in the returned sorted set are reflected in this sorted set, and vice-versa. The returned sorted set supports all optional set operations.Obeys the general contract of SortedSet.headSet.
-
tailSet
public SortedSet tailSet(Object fromElement)
Returns a view of the portion of this sorted set whose elements are greater than or equal to fromElement. The returned sorted set is backed by this sorted set, so changes in the returned sorted set are reflected in this sorted set, and vice-versa. The returned sorted set supports all optional set operations.Obeys the general contract of SortedSet.tailSet.
-
first
public Object first()
Returns the first (lowest) element currently in this sorted set.- Specified by:
first
in interfaceSortedSet
- Returns:
- the first (lowest) element currently in this sorted set
- Throws:
NoSuchElementException
- sorted set is empty
-
last
public Object last()
Returns the last (highest) element currently in this sorted set.- Specified by:
last
in interfaceSortedSet
- Returns:
- the last (highest) element currently in this sorted set
- Throws:
NoSuchElementException
- sorted set is empty
-
-