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
,SequencedCollection
,SequencedSet
,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:
-
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
-
Method Summary
Modifier and TypeMethodDescriptionReturns the comparator associated with this sorted set, or null if it uses its elements' natural ordering.first()
Returns the first (lowest) element currently in this sorted set.Returns a view of the portion of this sorted set whose elements are strictly less than toElement.last()
Returns the last (highest) element currently in this sorted set.Returns a view of the portion of this sorted set whose elements range from fromElement, inclusive, to toElement, exclusive.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
addFirst, addLast, getFirst, getLast, removeFirst, removeLast, reversed, spliterator
-
Constructor Details
-
RestrictedSortedSet
Constructor.- Parameters:
set
- the underlying SortedSetclz
- the class of objects that may be stored in the SortedSet
-
-
Method Details
-
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
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
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
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
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
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
-