Class MVRTreeMap<V>
- Type Parameters:
V- the value class
- All Implemented Interfaces:
ConcurrentMap<Spatial,V>, Map<Spatial, V>
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classA builder for this class.private static final classprivate static final classstatic classA cursor to iterate over a subset of the keys.Nested classes/interfaces inherited from class MVMap
MVMap.BasicBuilder<M,K, V>, MVMap.Decision, MVMap.DecisionMaker<V>, MVMap.MapBuilder<M, K, V> Nested classes/interfaces inherited from class AbstractMap
AbstractMap.SimpleEntry<K,V>, AbstractMap.SimpleImmutableEntry<K, V> -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final SpatialDataTypeThe spatial key type.private boolean -
Constructor Summary
ConstructorsModifierConstructorDescriptionMVRTreeMap(Map<String, Object> config, SpatialDataType keyType, DataType<V> valueType) privateMVRTreeMap(MVRTreeMap<V> source) -
Method Summary
Modifier and TypeMethodDescriptionvoidAdd a given key-value pair.voidAdd all node keys (including internal bounds) to the given list.cloneIt()Clone the current map.private booleanIterate over all keys that are fully contained within the given rectangle.Iterate over all keys that have an intersection with the given rectangle.Get the object for the given key.private Spatialprotected intGet the child page count for this page.getType()Get the map type.booleanprivate static <V> voidnewPage(boolean leaf) private Voperate(Page<Spatial, V> p, Spatial key, V value, MVMap.DecisionMaker<? super V> decisionMaker, Collection<Page<Spatial, V>> removedPages) operate(Spatial key, V value, MVMap.DecisionMaker<? super V> decisionMaker) Add, replace or remove a key-value pair.Add or replace a key-value pair.Remove a key-value pair, if the key exists.voidsetQuadraticSplit(boolean quadraticSplit) splitLinear(Page<Spatial, V> p) splitQuadratic(Page<Spatial, V> p) Methods inherited from class MVMap
append, asString, beforeWrite, ceilingKey, clear, containsKey, createEmptyLeaf, createEmptyNode, cursor, cursor, cursor, entrySet, equals, firstKey, floorKey, flushAndGetRoot, get, getId, getKey, getKeyIndex, getKeyType, getName, getRoot, getRootPage, getStore, getValueType, getVersion, hashCode, higherKey, higherKey, isClosed, isEmpty, isPersistent, isReadOnly, isVolatile, keyIterator, keyIteratorReverse, keyList, keySet, lastKey, lowerKey, lowerKey, openVersion, putIfAbsent, remove, replace, replace, setVolatile, size, sizeAsLong, toString, trimLast, tryLock, unlockRoot, updateRootMethods inherited from class AbstractMap
clone, containsValue, putAll, valuesMethods inherited from interface ConcurrentMap
compute, computeIfAbsent, computeIfPresent, forEach, getOrDefault, merge, replaceAllMethods inherited from interface Map
containsValue, putAll, values
-
Field Details
-
keyType
The spatial key type. -
quadraticSplit
private boolean quadraticSplit
-
-
Constructor Details
-
MVRTreeMap
-
MVRTreeMap
-
-
Method Details
-
cloneIt
-
findIntersectingKeys
Iterate over all keys that have an intersection with the given rectangle.- Parameters:
x- the rectangle- Returns:
- the iterator
-
findContainedKeys
Iterate over all keys that are fully contained within the given rectangle.- Parameters:
x- the rectangle- Returns:
- the iterator
-
contains
-
get
-
remove
-
operate
Description copied from class:MVMapAdd, replace or remove a key-value pair. -
operate
-
getBounds
-
put
Description copied from class:MVMapAdd or replace a key-value pair. -
add
-
split
-
splitLinear
-
splitQuadratic
-
newPage
-
move
-
addNodeKeys
-
isQuadraticSplit
public boolean isQuadraticSplit() -
setQuadraticSplit
public void setQuadraticSplit(boolean quadraticSplit) -
getChildPageCount
Description copied from class:MVMapGet the child page count for this page. This is to allow another map implementation to override the default, in case the last child is not to be used.- Overrides:
getChildPageCountin classMVMap<Spatial,V> - Parameters:
p- the page- Returns:
- the number of direct children
-
getType
-