Class PersistentTrieSet.BitmapIndexedSetNode<K>
java.lang.Object
io.usethesource.capsule.core.PersistentTrieSet.AbstractSetNode<K>
io.usethesource.capsule.core.PersistentTrieSet.CompactSetNode<K>
io.usethesource.capsule.core.PersistentTrieSet.CompactMixedSetNode<K>
io.usethesource.capsule.core.PersistentTrieSet.BitmapIndexedSetNode<K>
- All Implemented Interfaces:
Node, SetNode<K, PersistentTrieSet.AbstractSetNode<K>>, Serializable, Iterable<K>
- Enclosing class:
PersistentTrieSet<K>
private static final class PersistentTrieSet.BitmapIndexedSetNode<K>
extends PersistentTrieSet.CompactMixedSetNode<K>
-
Field Summary
FieldsModifier and TypeFieldDescription(package private) final AtomicReference<Thread> (package private) final Object[]Fields inherited from class PersistentTrieSet.CompactSetNode
BIT_PARTITION_MASK, BIT_PARTITION_SIZE, HASH_CODE_LENGTHFields inherited from class PersistentTrieSet.AbstractSetNode
TUPLE_LENGTHFields inherited from interface Node
SIZE_EMPTY, SIZE_MORE_THAN_ONE, SIZE_ONE -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivateBitmapIndexedSetNode(AtomicReference<Thread> mutator, int nodeMap, int dataMap, Object[] nodes) -
Method Summary
Modifier and TypeMethodDescription(package private) PersistentTrieSet.CompactSetNode<K> copyAndInsertValue(AtomicReference<Thread> mutator, int bitpos, K key) (package private) PersistentTrieSet.CompactSetNode<K> copyAndMigrateFromInlineToNode(AtomicReference<Thread> mutator, int bitpos, PersistentTrieSet.AbstractSetNode<K> node) (package private) PersistentTrieSet.CompactSetNode<K> copyAndMigrateFromNodeToInline(AtomicReference<Thread> mutator, int bitpos, PersistentTrieSet.AbstractSetNode<K> node) (package private) PersistentTrieSet.CompactSetNode<K> copyAndRemoveValue(AtomicReference<Thread> mutator, int bitpos) (package private) PersistentTrieSet.CompactSetNode<K> copyAndSetNode(AtomicReference<Thread> mutator, int bitpos, PersistentTrieSet.AbstractSetNode<K> newNode) private final booleandeepContentEquality(Object[] a1, Object[] a2, int splitAt, int length, EqualityComparator<Object> cmp) booleanbooleanequivalent(Object other, EqualityComparator<Object> cmp) getKey(int index) intgetKeyHash(int index) (package private) PersistentTrieSet.CompactSetNode<K> getNode(int index) (package private) ObjectgetSlot(int index) inthashCode()(package private) booleanhasNodes()boolean(package private) booleanhasSlots()(package private) int(package private) intintintfinal intsize()byteAbstract predicate over a node's size.(package private) intMethods inherited from class PersistentTrieSet.CompactMixedSetNode
dataMap, nodeMapMethods inherited from class PersistentTrieSet.CompactSetNode
bitpos, contains, dataIndex, findByKey, index, index, mask, mergeTwoKeyValPairs, nodeAt, nodeIndex, nodeInvariant, nodeOf, nodeOf, nodeOf, nodeOf, nodeOf, recoverMask, removed, toString, updatedMethods inherited from class PersistentTrieSet.AbstractSetNode
arity, dataArray, isAllowedToEdit, iterator, nodeIterator, spliterator, stream
-
Field Details
-
mutator
-
nodes
-
-
Constructor Details
-
BitmapIndexedSetNode
private BitmapIndexedSetNode(AtomicReference<Thread> mutator, int nodeMap, int dataMap, Object[] nodes)
-
-
Method Details
-
nodeArray
- Specified by:
nodeArrayin interfaceNode- Specified by:
nodeArrayin classPersistentTrieSet.AbstractSetNode<K>
-
getKey
-
getKeyHash
public int getKeyHash(int index) -
getNode
- Specified by:
getNodein classPersistentTrieSet.CompactSetNode<K>
-
hasPayload
public boolean hasPayload() -
payloadArity
public int payloadArity() -
hasNodes
boolean hasNodes()- Specified by:
hasNodesin classPersistentTrieSet.AbstractSetNode<K>
-
nodeArity
int nodeArity()- Specified by:
nodeArityin classPersistentTrieSet.AbstractSetNode<K>
-
getSlot
- Specified by:
getSlotin classPersistentTrieSet.AbstractSetNode<K>
-
hasSlots
boolean hasSlots()- Specified by:
hasSlotsin classPersistentTrieSet.AbstractSetNode<K>
-
slotArity
int slotArity()- Specified by:
slotArityin classPersistentTrieSet.AbstractSetNode<K>
-
localPayloadHashCode
int localPayloadHashCode()- Specified by:
localPayloadHashCodein classPersistentTrieSet.AbstractSetNode<K>
-
hashCode
-
equals
-
equivalent
-
deepContentEquality
private final boolean deepContentEquality(Object[] a1, Object[] a2, int splitAt, int length, EqualityComparator<Object> cmp) -
sizePredicate
-
size
public final int size()- Specified by:
sizein interfaceSetNode<K, PersistentTrieSet.AbstractSetNode<K>>- Overrides:
sizein classPersistentTrieSet.AbstractSetNode<K>
-
recursivePayloadHashCode
public int recursivePayloadHashCode()- Specified by:
recursivePayloadHashCodein interfaceSetNode<K, PersistentTrieSet.AbstractSetNode<K>>- Overrides:
recursivePayloadHashCodein classPersistentTrieSet.AbstractSetNode<K>
-
copyAndSetNode
PersistentTrieSet.CompactSetNode<K> copyAndSetNode(AtomicReference<Thread> mutator, int bitpos, PersistentTrieSet.AbstractSetNode<K> newNode) - Specified by:
copyAndSetNodein classPersistentTrieSet.CompactSetNode<K>
-
copyAndInsertValue
PersistentTrieSet.CompactSetNode<K> copyAndInsertValue(AtomicReference<Thread> mutator, int bitpos, K key) - Specified by:
copyAndInsertValuein classPersistentTrieSet.CompactSetNode<K>
-
copyAndRemoveValue
- Specified by:
copyAndRemoveValuein classPersistentTrieSet.CompactSetNode<K>
-
copyAndMigrateFromInlineToNode
PersistentTrieSet.CompactSetNode<K> copyAndMigrateFromInlineToNode(AtomicReference<Thread> mutator, int bitpos, PersistentTrieSet.AbstractSetNode<K> node) - Specified by:
copyAndMigrateFromInlineToNodein classPersistentTrieSet.CompactSetNode<K>
-
copyAndMigrateFromNodeToInline
PersistentTrieSet.CompactSetNode<K> copyAndMigrateFromNodeToInline(AtomicReference<Thread> mutator, int bitpos, PersistentTrieSet.AbstractSetNode<K> node) - Specified by:
copyAndMigrateFromNodeToInlinein classPersistentTrieSet.CompactSetNode<K>
-