Package com.gengoai.kv
Class AbstractNavigableKeyValueStore<K,V>
- java.lang.Object
-
- com.gengoai.kv.AbstractKeyValueStore<K,V>
-
- com.gengoai.kv.AbstractNavigableKeyValueStore<K,V>
-
- Type Parameters:
K
- the type parameterV
- the type parameter
- All Implemented Interfaces:
KeyValueStore<K,V>
,NavigableKeyValueStore<K,V>
,Serializable
,AutoCloseable
,Map<K,V>
public abstract class AbstractNavigableKeyValueStore<K,V> extends AbstractKeyValueStore<K,V> implements NavigableKeyValueStore<K,V>
The type Abstract navigable key value store.- Author:
- David B. Bracewell
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
AbstractNavigableKeyValueStore(String namespace, boolean readOnly)
Instantiates a new Abstract navigable key value store.
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description K
ceilingKey(K key)
Ceiling key k.protected abstract NavigableMap<K,V>
delegate()
Delegate navigable map.Set<Map.Entry<K,V>>
entrySet()
K
firstKey()
First key k.K
floorKey(K key)
Floor key k.K
higherKey(K key)
Higher key k.Iterator<K>
keyIterator(K key)
Key iterator iterator.K
lastKey()
Last key k.K
lowerKey(K key)
Lower key k.-
Methods inherited from class com.gengoai.kv.AbstractKeyValueStore
clear, containsKey, containsValue, get, getNameSpace, isEmpty, isReadOnly, keySet, put, putAll, remove, size, sizeAsLong, values
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface java.lang.AutoCloseable
close
-
Methods inherited from interface com.gengoai.kv.KeyValueStore
commit, getNameSpace, isReadOnly, sizeAsLong
-
Methods inherited from interface java.util.Map
clear, compute, computeIfAbsent, computeIfPresent, containsKey, containsValue, equals, forEach, get, getOrDefault, hashCode, isEmpty, keySet, merge, put, putAll, putIfAbsent, remove, remove, replace, replace, replaceAll, size, values
-
Methods inherited from interface com.gengoai.kv.NavigableKeyValueStore
keyIterator, searchCeiling
-
-
-
-
Constructor Detail
-
AbstractNavigableKeyValueStore
protected AbstractNavigableKeyValueStore(String namespace, boolean readOnly)
Instantiates a new Abstract navigable key value store.- Parameters:
namespace
- the namespacereadOnly
- the read only
-
-
Method Detail
-
ceilingKey
public K ceilingKey(K key)
Description copied from interface:NavigableKeyValueStore
Ceiling key k.- Specified by:
ceilingKey
in interfaceNavigableKeyValueStore<K,V>
- Parameters:
key
- the key- Returns:
- the k
-
delegate
protected abstract NavigableMap<K,V> delegate()
Delegate navigable map.- Specified by:
delegate
in classAbstractKeyValueStore<K,V>
- Returns:
- the navigable map
-
firstKey
public K firstKey()
Description copied from interface:NavigableKeyValueStore
First key k.- Specified by:
firstKey
in interfaceNavigableKeyValueStore<K,V>
- Returns:
- the k
-
floorKey
public K floorKey(K key)
Description copied from interface:NavigableKeyValueStore
Floor key k.- Specified by:
floorKey
in interfaceNavigableKeyValueStore<K,V>
- Parameters:
key
- the key- Returns:
- the k
-
higherKey
public K higherKey(K key)
Description copied from interface:NavigableKeyValueStore
Higher key k.- Specified by:
higherKey
in interfaceNavigableKeyValueStore<K,V>
- Parameters:
key
- the key- Returns:
- the k
-
keyIterator
public Iterator<K> keyIterator(K key)
Description copied from interface:NavigableKeyValueStore
Key iterator iterator.- Specified by:
keyIterator
in interfaceNavigableKeyValueStore<K,V>
- Parameters:
key
- the key- Returns:
- the iterator
-
lastKey
public K lastKey()
Description copied from interface:NavigableKeyValueStore
Last key k.- Specified by:
lastKey
in interfaceNavigableKeyValueStore<K,V>
- Returns:
- the k
-
lowerKey
public K lowerKey(K key)
Description copied from interface:NavigableKeyValueStore
Lower key k.- Specified by:
lowerKey
in interfaceNavigableKeyValueStore<K,V>
- Parameters:
key
- the key- Returns:
- the k
-
-