net.sf.beanlib.utils.range
Interface SortedRangeMap<T,K,V>
- All Superinterfaces:
- Map<K,V>, SortedMap<K,V>
- All Known Implementing Classes:
- CollectionUtils.SynchronizedSortedRangeMap, RangeTreeMap
public interface SortedRangeMap<T,K,V>
- extends SortedMap<K,V>
An extension of SortedMap
that allows key with ranges
to be retrieved with a specified point.
- Author:
- Joe D. Velopar
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 interface java.util.Map |
clear, containsKey, containsValue, entrySet, equals, get, hashCode, isEmpty, keySet, put, putAll, remove, size, values |
getByPoint
V getByPoint(Comparable<T> point)
- 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.
- 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:
containsKeyPoint(Comparable)
containsKeyPoint
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.
- 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.