Class ImmutableNode<K,V>
java.lang.Object
tools.refinery.store.map.internal.state.Node<K,V>
tools.refinery.store.map.internal.state.ImmutableNode<K,V>
- All Implemented Interfaces:
Version
-
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
-
Method Summary
Modifier and TypeMethodDescriptionvoid
checkIntegrity
(ContinuousHashProvider<? super K> hashProvider, V defaultValue, int depth) static boolean
compareImmutableMutable
(ImmutableNode<?, ?> immutable, MutableNode<?, ?> mutable) boolean
Equivalence of twoVersion
.long
getSize()
getValue
(K key, ContinuousHashProvider<? super K> hashProvider, V defaultValue, int hash, int depth) int
hashCode()
Hashcode should be updated in accordance with equals.protected MutableNode
<K, V> void
prettyPrint
(StringBuilder builder, int depth, int code) putValue
(K key, V value, OldValueBox<V> oldValue, 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
-
Method Details
-
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> oldValue, ContinuousHashProvider<? super K> hashProvider, V defaultValue, int hash, int depth) -
getSize
public long getSize() -
toMutable
-
toImmutable
- Specified by:
toImmutable
in classNode<K,
V>
-
isMutable
-
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>
-
hashCode
public int hashCode()Description copied from interface:Version
Hashcode should be updated in accordance with equals. -
equals
Description copied from interface:Version
Equivalence of twoVersion
. This equivalence must satisfy the following constraint (in addition to the constraints ofObject.equals(Object)
: ifv1
andv2
areVersion
s, andv1 .equals(v2)
, thenversioned.restore(v1)
must beequals
toversioned.restore(v2)
. -
compareImmutableMutable
public static boolean compareImmutableMutable(ImmutableNode<?, ?> immutable, MutableNode<?, ?> mutable)
-