net.sf.beanlib.utils
Class CollectionUtils.SynchronizedSortedRangeMap<T,K,V>
java.lang.Object
net.sf.beanlib.utils.CollectionUtils.SynchronizedMap<K,V>
net.sf.beanlib.utils.CollectionUtils.SynchronizedSortedMap<K,V>
net.sf.beanlib.utils.CollectionUtils.SynchronizedSortedRangeMap<T,K,V>
- All Implemented Interfaces:
- Serializable, Map<K,V>, SortedMap<K,V>, SortedRangeMap<T,K,V>
- Enclosing class:
- CollectionUtils
static class CollectionUtils.SynchronizedSortedRangeMap<T,K,V>
- extends CollectionUtils.SynchronizedSortedMap<K,V>
- implements SortedRangeMap<T,K,V>
A thread-safe SortedRangeMap.
Nested classes/interfaces inherited from interface java.util.Map |
Map.Entry<K,V> |
Method Summary |
boolean |
containsKeyPoint(Comparable<T> point)
Returns true if this map contains a mapping of a key
with a range that the specified point falls within. |
V |
getByPoint(Comparable<T> point)
Returns the value to which this map maps a key with a range
that the specified point falls within. |
Methods inherited from class net.sf.beanlib.utils.CollectionUtils.SynchronizedMap |
clear, containsKey, containsValue, entrySet, equals, get, hashCode, isEmpty, keySet, put, putAll, remove, size, toString, values |
Methods inherited from interface java.util.Map |
clear, containsKey, containsValue, entrySet, equals, get, hashCode, isEmpty, keySet, put, putAll, remove, size, values |
serialVersionUID
private static final long serialVersionUID
- See Also:
- Constant Field Values
srm
private SortedRangeMap<T,K,V> srm
CollectionUtils.SynchronizedSortedRangeMap
CollectionUtils.SynchronizedSortedRangeMap(SortedRangeMap<T,K,V> srm)
CollectionUtils.SynchronizedSortedRangeMap
CollectionUtils.SynchronizedSortedRangeMap(SortedRangeMap<T,K,V> srm,
Object mutex)
getByPoint
public V getByPoint(Comparable<T> point)
- Description copied from interface:
SortedRangeMap
- Returns the value to which this map maps a key with a range
that the specified point falls within.
Returns null if the map contains no mapping for any key with such range.
A return value of null does not necessarily indicate that the
map contains no mapping for a key with such range; it's also possible that the map
explicitly maps the key with such range to null. The containsKeyPoint
operation may be used to distinguish these two cases.
- Specified by:
getByPoint
in interface SortedRangeMap<T,K,V>
- Parameters:
point
- the point that falls within the range of a key
whose associated value is to be returned.
- Returns:
- the value to which this map maps a key with a range
that the specified point falls within, or
null if the map contains no mapping for any key with such range.
- See Also:
SortedRangeMap.containsKeyPoint(Comparable)
containsKeyPoint
public boolean containsKeyPoint(Comparable<T> point)
- Description copied from interface:
SortedRangeMap
- Returns true if this map contains a mapping of a key
with a range that the specified point falls within.
- Specified by:
containsKeyPoint
in interface SortedRangeMap<T,K,V>
- Parameters:
point
- point to be tested.
- Returns:
- true if this map contains a mapping of a key with a range
that the specified point falls within.