Class MutableNode<K,V>
java.lang.Object
tools.refinery.store.map.internal.state.Node<K,V>
tools.refinery.store.map.internal.state.MutableNode<K,V>
-
Field Summary
FieldsFields inherited from class tools.refinery.store.map.internal.state.Node
BRANCHING_FACTOR_BITS, EFFECTIVE_BITS, FACTOR, FACTOR_MASK, FACTOR_SELECTION_BITS, FACTOR_SELECTION_MASK, INCREMENT_BIG_STEP, NUMBER_OF_FACTORS -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedprotectedMutableNode(ImmutableNode<K, V> node) Constructs aMutableNodeas a copy of anImmutableNode -
Method Summary
Modifier and TypeMethodDescriptionvoidcheckIntegrity(ContinuousHashProvider<? super K> hashProvider, V defaultValue, int depth) booleanlonggetSize()getValue(K key, ContinuousHashProvider<? super K> hashProvider, V defaultValue, int hash, int depth) inthashCode()static <K,V> MutableNode <K, V> initialize(K key, V value, ContinuousHashProvider<? super K> hashProvider, V defaultValue) protected voidprotected MutableNode<K, V> protected intvoidprettyPrint(StringBuilder builder, int depth, int code) putValue(K key, V value, OldValueBox<V> oldValueBox, ContinuousHashProvider<? super K> hashProvider, V defaultValue, int hash, int depth) toImmutable(Map<Node<K, V>, ImmutableNode<K, V>> cache) protected MutableNode<K, V> Methods inherited from class tools.refinery.store.map.internal.state.Node
hashDepth, hashFragment, incrementDepth, newHash, shiftDepth, toString
-
Field Details
-
cachedHashValid
protected boolean cachedHashValid -
-
-
Constructor Details
-
MutableNode
protected MutableNode() -
MutableNode
Constructs aMutableNodeas a copy of anImmutableNode- Parameters:
node- to be transformed
-
-
Method Details
-
initialize
public static <K,V> MutableNode<K,V> initialize(K key, V value, ContinuousHashProvider<? super K> hashProvider, V defaultValue) -
getValue
public V getValue(K key, ContinuousHashProvider<? super K> hashProvider, V defaultValue, int hash, int depth) -
putValue
public Node<K,V> putValue(K key, V value, OldValueBox<V> oldValueBox, ContinuousHashProvider<? super K> hashProvider, V defaultValue, int hash, int depth) -
isMutable
-
isOrphaned
protected int isOrphaned() -
getSize
public long getSize() -
toMutable
-
toImmutable
- Specified by:
toImmutablein classNode<K,V>
-
prettyPrint
- Specified by:
prettyPrintin classNode<K,V>
-
checkIntegrity
public void checkIntegrity(ContinuousHashProvider<? super K> hashProvider, V defaultValue, int depth) - Overrides:
checkIntegrityin classNode<K,V>
-
invalidateHash
protected void invalidateHash() -
hashCode
public int hashCode() -
equals
-