K - the key typeV - the value typepublic interface IntervalMap<K,V>
| Modifier and Type | Field and Description |
|---|---|
static IntervalMap |
EMPTY |
| Modifier and Type | Method and Description |
|---|---|
static <K,V> IntervalMap<K,V> |
empty() |
default Optional<V> |
get(K key)
Get the value of the first interval matching the supplied key.
|
Optional<V> |
get(K lower,
K upper)
Get the first value falling into the interval.
|
default V |
getOrDefault(K lower,
K upper,
V value)
Get the first value falling into the interval or the supplied default.
|
default V |
getOrDefault(K key,
V value)
Get the first value for the specified key or the supplied default.
|
default Set<V> |
search(K key)
Get the values for all intervals matching the supplied key.
|
Set<V> |
search(K lower,
K upper)
Get all values falling into the specified interval.
|
static <K,V> IntervalMap<K,V> |
universal(V value)
Creates a
IntervalMap that returns the same value for each key. |
static final IntervalMap EMPTY
default Optional<V> get(K key)
key - the keyOptional<V> get(K lower, K upper)
lower - the lower boundupper - the upper bounddefault V getOrDefault(K key, V value)
key - the keyvalue - the default valuedefault V getOrDefault(K lower, K upper, V value)
lower - the lower boundupper - the upper boundvalue - the default valuedefault Set<V> search(K key)
key - the keySet<V> search(K lower, K upper)
lower - the upper boundupper - the lower boundstatic <K,V> IntervalMap<K,V> universal(V value)
IntervalMap that returns the same value for each key.K - the key typeV - the value typevalue - the valueIntervalMapstatic <K,V> IntervalMap<K,V> empty()
Copyright © 2015–2021 52North Initiative for Geospatial Open Source Software GmbH. All rights reserved.