java.lang.Object
io.usethesource.capsule.core.trie.BottomUpImmutableNodeTransformer<SN,DN>
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final IntFunction<DN[]> private final DNprivate final DN[]private static final intprivate final AtomicReference<Thread> private final BiFunction<SN, DN[], DN> private final int[]private final SN[]private int -
Constructor Summary
ConstructorsConstructorDescriptionBottomUpImmutableNodeTransformer(SN srcRootNode, BiFunction<SN, DN[], DN> nodeMapper, IntFunction<DN[]> arrayConstructor) -
Method Summary
Modifier and TypeMethodDescriptionfinal DNapply()applyNodeTransformation(SN rootNode, BiFunction<SN, DN[], DN> nodeMapper, IntFunction<DN[]> arrayConstructor) private final voidprivate final booleanprivate final voidprivate final voidpushOnStack(SN srcNode)
-
Field Details
-
MAX_DEPTH
private static final int MAX_DEPTH- See Also:
-
nodeMapper
-
mutator
-
dstRootNode
-
arrayConstructor
-
stackIndex
private int stackIndex -
srcNodeStack
-
srcNodeCursorsAndLengths
private final int[] srcNodeCursorsAndLengths -
mappedNodesStack
-
EMPTY_DN_ARRAY
-
-
Constructor Details
-
BottomUpImmutableNodeTransformer
public BottomUpImmutableNodeTransformer(SN srcRootNode, BiFunction<SN, DN[], DN> nodeMapper, IntFunction<DN[]> arrayConstructor)
-
-
Method Details
-
applyNodeTransformation
static final <SN extends Node, DN extends Node> DN applyNodeTransformation(SN rootNode, BiFunction<SN, DN[], DN> nodeMapper, IntFunction<DN[]> arrayConstructor) -
apply
-
isStackEmpty
private final boolean isStackEmpty() -
pushOnStack
-
dropFromStack
private final void dropFromStack() -
processStack
private final void processStack()
-