Skip navigation links
com.tangosol.util
Class RestrictedCollections.RestrictedSortedMap
java.lang.Object
com.tangosol.util.Base
com.tangosol.util.RestrictedCollections.RestrictedMap
com.tangosol.util.RestrictedCollections.RestrictedSortedMap
- All Implemented Interfaces:
- java.io.Serializable, java.util.Map, java.util.SortedMap
- Enclosing class:
- RestrictedCollections
-
public static class RestrictedCollections.RestrictedSortedMap
- extends RestrictedCollections.RestrictedMap
- implements java.util.SortedMap, java.io.Serializable
A restricted SortedMap that requires its keys and values to be of specified classes.
Nested classes/interfaces inherited from interface java.util.Map |
java.util.Map.Entry |
Method Summary |
java.util.Comparator |
comparator()
Returns the comparator associated with this sorted map, or null if it uses its keys' natural ordering. |
java.lang.Object |
firstKey()
Returns the first (lowest) key currently in this sorted map. |
java.util.SortedMap |
headMap(java.lang.Object toKey)
Returns a view of the portion of this sorted map whose keys are strictly less than toKey. |
java.lang.Object |
lastKey()
Returns the last (highest) key currently in this sorted map. |
java.util.SortedMap |
subMap(java.lang.Object fromKey, java.lang.Object toKey)
Returns a view of the portion of this sorted map whose keys range from fromKey, inclusive, to toKey, exclusive. |
java.util.SortedMap |
tailMap(java.lang.Object fromKey)
Returns a view of the portion of this sorted map whose keys are greater than or equal to fromKey. |
Methods inherited from class com.tangosol.util.RestrictedCollections.RestrictedMap |
checkKey, checkValue, clear, containsKey, containsValue, entrySet, equals, get, hashCode, isEmpty, keySet, put, putAll, remove, size, toString, values |
Methods inherited from interface java.util.SortedMap |
entrySet, keySet, values |
Methods inherited from interface java.util.Map |
clear, containsKey, containsValue, equals, get, hashCode, isEmpty, put, putAll, remove, size |
RestrictedCollections.RestrictedSortedMap
public RestrictedCollections.RestrictedSortedMap(java.util.Map map,
java.lang.Class clzKey,
java.lang.Class clzVal)
- Constructor.
- Parameters:
map
- the underlying SortedMap
clzKey
- the class of keys that may be stored in the Map
clzVal
- the class of values that may be stored in the Map
comparator
public java.util.Comparator comparator()
- Returns the comparator associated with this sorted map, or null if it uses its keys' natural ordering.
-
- Specified by:
comparator
in interface java.util.SortedMap
-
- Returns:
- the comparator associated with this sorted map, or null if it uses its keys' natural ordering
subMap
public java.util.SortedMap subMap(java.lang.Object fromKey,
java.lang.Object toKey)
- Returns a view of the portion of this sorted map whose keys range from fromKey, inclusive, to toKey, exclusive. Obeys the general contract of SortedMap.subMap.
-
- Specified by:
subMap
in interface java.util.SortedMap
-
- Parameters:
fromKey
- low endpoint (inclusive) of the subMap
toKey
- high endpoint (exclusive) of the subMap
- Returns:
- a view of the specified range within this sorted map
headMap
public java.util.SortedMap headMap(java.lang.Object toKey)
- Returns a view of the portion of this sorted map whose keys are strictly less than toKey.
-
- Specified by:
headMap
in interface java.util.SortedMap
-
- Parameters:
toKey
- high endpoint (exclusive) of the subMap
- Returns:
- a view of the specified initial range of this sorted map
tailMap
public java.util.SortedMap tailMap(java.lang.Object fromKey)
- Returns a view of the portion of this sorted map whose keys are greater than or equal to fromKey.
-
- Specified by:
tailMap
in interface java.util.SortedMap
-
- Parameters:
fromKey
- low endpoint (inclusive) of the tailMap
- Returns:
- a view of the specified final range of this sorted map
firstKey
public java.lang.Object firstKey()
- Returns the first (lowest) key currently in this sorted map.
-
- Specified by:
firstKey
in interface java.util.SortedMap
-
- Returns:
- the first (lowest) key currently in this sorted map
lastKey
public java.lang.Object lastKey()
- Returns the last (highest) key currently in this sorted map.
-
- Specified by:
lastKey
in interface java.util.SortedMap
-
- Returns:
- the last (highest) key currently in this sorted map
Skip navigation links
Copyright © 2000, 2014, Oracle and/or its affiliates. All rights reserved.