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 TypeMethodDescriptionvoidcheckIntegrity(ContinuousHashProvider<? super K> hashProvider, V defaultValue, int depth) static booleancompareImmutableMutable(ImmutableNode<?, ?> immutable, MutableNode<?, ?> mutable) booleanEquivalence of twoVersion.longgetSize()getValue(K key, ContinuousHashProvider<? super K> hashProvider, V defaultValue, int hash, int depth) inthashCode()Hashcode should be updated in accordance with equals.protected MutableNode<K, V> voidprettyPrint(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:
toImmutablein classNode<K,V>
-
isMutable
-
prettyPrint
- Specified by:
prettyPrintin classNode<K,V>
-
checkIntegrity
public void checkIntegrity(ContinuousHashProvider<? super K> hashProvider, V defaultValue, int depth) - Overrides:
checkIntegrityin classNode<K,V>
-
hashCode
public int hashCode()Description copied from interface:VersionHashcode should be updated in accordance with equals. -
equals
Description copied from interface:VersionEquivalence of twoVersion. This equivalence must satisfy the following constraint (in addition to the constraints ofObject.equals(Object): ifv1andv2areVersions, andv1 .equals(v2), thenversioned.restore(v1)must beequalstoversioned.restore(v2). -
compareImmutableMutable
public static boolean compareImmutableMutable(ImmutableNode<?, ?> immutable, MutableNode<?, ?> mutable)
-