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
Fields 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
ModifierConstructorDescriptionprotected
protected
MutableNode
(ImmutableNode<K, V> node) Constructs aMutableNode
as a copy of anImmutableNode
-
Method Summary
Modifier and TypeMethodDescriptionvoid
checkIntegrity
(ContinuousHashProvider<? super K> hashProvider, V defaultValue, int depth) boolean
long
getSize()
getValue
(K key, ContinuousHashProvider<? super K> hashProvider, V defaultValue, int hash, int depth) int
hashCode()
static <K,
V> MutableNode <K, V> initialize
(K key, V value, ContinuousHashProvider<? super K> hashProvider, V defaultValue) protected void
protected MutableNode
<K, V> protected int
void
prettyPrint
(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 aMutableNode
as 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:
toImmutable
in classNode<K,
V>
-
prettyPrint
- Specified by:
prettyPrint
in classNode<K,
V>
-
checkIntegrity
public void checkIntegrity(ContinuousHashProvider<? super K> hashProvider, V defaultValue, int depth) - Overrides:
checkIntegrity
in classNode<K,
V>
-
invalidateHash
protected void invalidateHash() -
hashCode
public int hashCode() -
equals
-