K - the type of the interval (must implement Interval).V - the type of the values to store.public interface IntervalMap<K extends Interval<?>,V>
| Modifier and Type | Method and Description |
|---|---|
void |
clear() |
List<V> |
findAllLessSpecific(K key)
Finds all values that are associated to intervals that contain
key but are not equal to key. |
List<V> |
findAllMoreSpecific(K key)
Finds all values associated with intervals that are contained within
(more specific than)
key, but not equal to key. |
List<V> |
findExact(K key)
Finds the value associated with
key, if it exists. |
List<V> |
findExactAndAllLessSpecific(K key)
Finds all values that are associated to intervals that contain
key. |
List<V> |
findExactAndAllMoreSpecific(K key)
Finds all values associated with intervals that are equal to
key or contained within (more specific than)
key. |
List<V> |
findExactOrFirstLessSpecific(K key)
Finds the value associated with
key, or its closest
enclosing if key is not contained in this map, if it exists. |
List<V> |
findFirstLessSpecific(K key)
Finds the value associated with closest interval that contains
key but is not equal to key. |
List<V> |
findFirstMoreSpecific(K key)
Finds all values associated with intervals that are more specific
(contained in)
key, but excluding the values that are nested
inside the matching intervals. |
V |
put(K key,
V value)
Associates the specified value with the specified key in this map If the
map previously contained a mapping for the key, the old value is replaced
by the specified value.
|
V |
remove(K key)
Removes the mapping for a key from this map if it is present.
|
void |
remove(K key,
V value)
Removes the mapping for a key and value from this map if both are present.
|
V put(K key, V value)
key - key with which the specified value is to be associatedvalue - value to be associated with the specified keyIllegalArgumentException - if the key or value is nullIntersectingIntervalException - if the key intersects (but is not contained within) an existing
keyV remove(K key)
key - key whose mapping is to be removed from the mapIllegalArgumentException - if the specified key is nullvoid remove(K key, V value)
key - key whose mapping is to be removed from the mapvalue - value with the key to be removed from the mapIllegalArgumentException - if the specified key or value is nullvoid clear()
List<V> findFirstLessSpecific(K key)
key but is not equal to key.key - the key to find the closest enclosing interval forkey, or an empty list if no such mapping exists.List<V> findExact(K key)
key, if it exists.key - the key to find the mapping forkey or an empty list if no
such value existsList<V> findExactOrFirstLessSpecific(K key)
key, or its closest
enclosing if key is not contained in this map, if it exists.key - the key to find the mapping forkey or its closest
containing interval, or an empty list if no such value existsList<V> findAllLessSpecific(K key)
key but are not equal to key.
The resulting values are ordered from least specific interval to most
specific interval.key - the key to find all containing intervals forkey but is not equal to
key.List<V> findExactAndAllLessSpecific(K key)
key.
The resulting values are ordered from least specific interval to most
specific interval. So if a mapping for key exists the last
element of the returned list will contain the value associated with
key.key - the key to find all containing intervals forkeyList<V> findFirstMoreSpecific(K key)
key, but excluding the values that are nested
inside the matching intervals.
The resulting values are ordered from least specific interval to most
specific interval.key - the key to find the first level more specific values forList<V> findAllMoreSpecific(K key)
key, but not equal to key.
The resulting values are ordered from least specific interval to most
specific interval.key - the key to find all levels more specific values forList<V> findExactAndAllMoreSpecific(K key)
key or contained within (more specific than)
key.
The resulting values are ordered from least specific interval to most
specific interval. So if a mapping for key exists the first
element of the returned list will contain the value associated with
key.key - the key to find the exact and all levels more specific values
forCopyright © 2022. All rights reserved.