Class calitha.collections.INavigableMap
Extends
calitha.collections.ISortedMap.
A SortedMap extended with navigation methods returning the closest matches for given search targets.
It is based on the Java NavigableMap interface. Differences are:
- In Java it is the NavigableMap interface that has methods with extra inclusive parameters for subMap and such. Those methods have been put in this ISortedMap class to replace those same methods without the inclusive parameters. This is done because overloading methods with inheritance too would be too confusing. And the methods with inclusive parameters are more clear anyway.
Defined in: INavigableMap.js.
Constructor Attributes | Constructor Name and Description |
---|---|
Method Attributes | Method Name and Description |
---|---|
ceilingEntry(key)
Returns a key-value mapping associated with the least key greater than or equal to the given key,
or null if there is no such key.
|
|
ceilingKey(key)
Returns the least key greater than or equal to the given key, or null if there is no such key.
|
|
Returns a reverse order NavigableSet view of the keys contained in this map.
|
|
Returns a reverse order view of the mappings contained in this map.
|
|
Returns a key-value mapping associated with the least key in this map, or null if the map is empty.
|
|
floorEntry(key)
Returns a key-value mapping associated with the greatest key less than or equal to the given key,
or null if there is no such key.
|
|
floorKey(key)
Returns the greatest key less than or equal to the given key, or null if there is no such key.
|
|
higherEntry(key)
Returns a key-value mapping associated with the least key strictly greater than the given key,
or null if there is no such key.
|
|
higherKey(key)
Returns the least key strictly greater than the given key, or null if there is no such key.
|
|
Returns a key-value mapping associated with the greatest key in this map, or null if the map is empty.
|
|
lowerEntry(key)
Returns a key-value mapping associated with the greatest key strictly less than the given key,
or null if there is no such key.
|
|
lowerKey(key)
Returns the greatest key strictly less than the given key, or null if there is no such key.
|
|
Returns a NavigableSet view of the keys contained in this map.
|
|
Removes and returns a key-value mapping associated with the least key in this map, or null if the map is empty.
|
|
Removes and returns a key-value mapping associated with the greatest key in this map,
or null if the map is empty.
|
- Methods borrowed from class calitha.collections.ISortedMap:
- comparator, firstKey, headMap, lastKey, subMap, tailMap
- Methods borrowed from class calitha.collections.IMap:
- clear, containsKey, containsValue, entrySet, equals, get, hashCode, isEmpty, keySet, put, putAll, remove, size, values
Method Detail
{calitha.collections.imap.IEntry}
ceilingEntry(key)
Returns a key-value mapping associated with the least key greater than or equal to the given key,
or null if there is no such key.
- Parameters:
- {Object} key
- the key
- Returns:
- {calitha.collections.imap.IEntry} an entry with the least key greater than or equal to key, or null if there is no such key
{calitha.collections.imap.IEntry}
ceilingKey(key)
Returns the least key greater than or equal to the given key, or null if there is no such key.
- Parameters:
- {Object} key
- the key
- Returns:
- {calitha.collections.imap.IEntry} the least key greater than or equal to key, or null if there is no such key
{calitha.collections.INavigableSet}
descendingKeySet()
Returns a reverse order NavigableSet view of the keys contained in this map.
- Returns:
- {calitha.collections.INavigableSet} a reverse order navigable set view of the keys in this map
{calitha.collections.INavigableMap}
descendingMap()
Returns a reverse order view of the mappings contained in this map.
- Returns:
- {calitha.collections.INavigableMap} a reverse order view of this map
{calitha.collections.imap.IEntry}
firstEntry()
Returns a key-value mapping associated with the least key in this map, or null if the map is empty.
- Returns:
- {calitha.collections.imap.IEntry} an entry with the least key, or null if this map is empty
{calitha.collections.imap.IEntry}
floorEntry(key)
Returns a key-value mapping associated with the greatest key less than or equal to the given key,
or null if there is no such key.
- Parameters:
- {Object} key
- the key
- Returns:
- {calitha.collections.imap.IEntry} an entry with the greatest key less than or equal to key, or null if there is no such key
{Object}
floorKey(key)
Returns the greatest key less than or equal to the given key, or null if there is no such key.
- Parameters:
- {Object} key
- the key
- Returns:
- {Object} the greatest key less than or equal to key, or null if there is no such key
{calitha.collections.imap.IEntry}
higherEntry(key)
Returns a key-value mapping associated with the least key strictly greater than the given key,
or null if there is no such key.
- Parameters:
- {Object} key
- the key
- Returns:
- {calitha.collections.imap.IEntry} an entry with the least key greater than key, or null if there is no such key
{Object}
higherKey(key)
Returns the least key strictly greater than the given key, or null if there is no such key.
- Parameters:
- {Object} key
- the key
- Returns:
- {Object} the least key greater than key, or null if there is no such key
{calitha.collections.imap.IEntry}
lastEntry()
Returns a key-value mapping associated with the greatest key in this map, or null if the map is empty.
- Returns:
- {calitha.collections.imap.IEntry} an entry with the greatest key, or null if this map is empty
{calitha.collections.imap.IEntry}
lowerEntry(key)
Returns a key-value mapping associated with the greatest key strictly less than the given key,
or null if there is no such key.
- Parameters:
- {Object} key
- the key
- Returns:
- {calitha.collections.imap.IEntry} an entry with the greatest key less than key, or null if there is no such key
{Object}
lowerKey(key)
Returns the greatest key strictly less than the given key, or null if there is no such key.
- Parameters:
- {Object} key
- the key
- Returns:
- {Object} the greatest key less than key, or null if there is no such key
{calitha.collections.INavigableSet}
navigableKeySet()
Returns a NavigableSet view of the keys contained in this map.
- Returns:
- {calitha.collections.INavigableSet} a navigable set view of the keys in this map
{calitha.collections.imap.IEntry}
pollFirstEntry()
Removes and returns a key-value mapping associated with the least key in this map, or null if the map is empty.
- Returns:
- {calitha.collections.imap.IEntry} the removed first entry of this map, or null if this map is empty
{calitha.collections.imap.IEntry}
pollLastEntry()
Removes and returns a key-value mapping associated with the greatest key in this map,
or null if the map is empty.
- Returns:
- {calitha.collections.imap.IEntry} the removed last entry of this map, or null if this map is empty