Package io.usethesource.capsule.core
Class PersistentTrieSet.AbstractSetNode<K>
- java.lang.Object
-
- io.usethesource.capsule.core.PersistentTrieSet.AbstractSetNode<K>
-
- All Implemented Interfaces:
Node
,SetNode<K,PersistentTrieSet.AbstractSetNode<K>>
,java.io.Serializable
,java.lang.Iterable<K>
- Direct Known Subclasses:
PersistentTrieSet.CompactSetNode
- Enclosing class:
- PersistentTrieSet<K>
protected abstract static class PersistentTrieSet.AbstractSetNode<K> extends java.lang.Object implements SetNode<K,PersistentTrieSet.AbstractSetNode<K>>, java.lang.Iterable<K>, java.io.Serializable
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description private static long
serialVersionUID
(package private) static int
TUPLE_LENGTH
-
Fields inherited from interface io.usethesource.capsule.core.trie.Node
SIZE_EMPTY, SIZE_MORE_THAN_ONE, SIZE_ONE
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
AbstractSetNode()
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Deprecated Methods Modifier and Type Method Description (package private) int
arity()
The arity of this trie node (i.e.private <T> ArrayView<T>
categoryArrayView0()
<T> ArrayView<T>
dataArray(int category, int component)
Creates an array abstraction for a subset of data stored in a node.(package private) abstract PersistentTrieSet.AbstractSetNode<K>
getNode(int index)
(package private) abstract java.lang.Object
getSlot(int index)
(package private) abstract boolean
hasNodes()
(package private) abstract boolean
hasSlots()
Deprecated.(package private) static <T> boolean
isAllowedToEdit(java.util.concurrent.atomic.AtomicReference<?> x, java.util.concurrent.atomic.AtomicReference<?> y)
java.util.Iterator<K>
iterator()
(package private) abstract int
localPayloadHashCode()
(package private) abstract int
nodeArity()
abstract ArrayView<PersistentTrieSet.AbstractSetNode<K>>
nodeArray()
(package private) java.util.Iterator<? extends PersistentTrieSet.AbstractSetNode<K>>
nodeIterator()
Deprecated.int
recursivePayloadHashCode()
int
size()
(package private) abstract int
slotArity()
java.util.Spliterator<K>
spliterator()
java.util.stream.Stream<K>
stream()
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface io.usethesource.capsule.core.trie.Node
sizePredicate
-
Methods inherited from interface io.usethesource.capsule.core.trie.SetNode
contains, equivalent, findByKey, findFirst, getKey, getKeyHash, getPayload, hasPayload, intersect, payloadArity, removed, subtract, union, updated
-
-
-
-
Field Detail
-
serialVersionUID
private static final long serialVersionUID
- See Also:
- Constant Field Values
-
TUPLE_LENGTH
static final int TUPLE_LENGTH
- See Also:
- Constant Field Values
-
-
Method Detail
-
isAllowedToEdit
static final <T> boolean isAllowedToEdit(java.util.concurrent.atomic.AtomicReference<?> x, java.util.concurrent.atomic.AtomicReference<?> y)
-
dataArray
public <T> ArrayView<T> dataArray(int category, int component)
Description copied from interface:Node
Creates an array abstraction for a subset of data stored in a node.
-
categoryArrayView0
private <T> ArrayView<T> categoryArrayView0()
-
nodeArray
public abstract ArrayView<PersistentTrieSet.AbstractSetNode<K>> nodeArray()
-
hasNodes
abstract boolean hasNodes()
-
nodeArity
abstract int nodeArity()
-
getNode
abstract PersistentTrieSet.AbstractSetNode<K> getNode(int index)
-
nodeIterator
@Deprecated java.util.Iterator<? extends PersistentTrieSet.AbstractSetNode<K>> nodeIterator()
Deprecated.
-
hasSlots
@Deprecated abstract boolean hasSlots()
Deprecated.
-
slotArity
abstract int slotArity()
-
getSlot
abstract java.lang.Object getSlot(int index)
-
arity
int arity()
The arity of this trie node (i.e. number of values and nodes stored on this level).- Returns:
- sum of nodes and values stored within
-
size
public int size()
- Specified by:
size
in interfaceSetNode<K,PersistentTrieSet.AbstractSetNode<K>>
-
localPayloadHashCode
abstract int localPayloadHashCode()
-
recursivePayloadHashCode
public int recursivePayloadHashCode()
- Specified by:
recursivePayloadHashCode
in interfaceSetNode<K,PersistentTrieSet.AbstractSetNode<K>>
-
iterator
public java.util.Iterator<K> iterator()
- Specified by:
iterator
in interfacejava.lang.Iterable<K>
-
spliterator
public java.util.Spliterator<K> spliterator()
- Specified by:
spliterator
in interfacejava.lang.Iterable<K>
-
stream
public java.util.stream.Stream<K> stream()
-
-