java.lang.Object
io.usethesource.capsule.core.trie.BottomUpTransientNodeTransformer<SN,DN>
Mapper that traverses a trie and converts each node (of
SN
) to a node of type DN
.-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final ListIterator<DN>[]
private final DN
private static final int
private final AtomicReference
<Thread> private final BiFunction
<SN, AtomicReference<Thread>, DN> private final ListIterator<SN>[]
private int
-
Constructor Summary
ConstructorsConstructorDescriptionBottomUpTransientNodeTransformer
(SN srcRootNode, BiFunction<SN, AtomicReference<Thread>, DN> nodeMapper) -
Method Summary
Modifier and TypeMethodDescriptionfinal DN
apply()
private final void
private final boolean
private final void
private final void
pushOnStack
(ListIterator<SN> srcNode, ListIterator<DN> dstNode)
-
Field Details
-
MAX_DEPTH
private static final int MAX_DEPTH- See Also:
-
nodeMapper
-
mutator
-
dstRootNode
-
stackIndex
private int stackIndex -
srcIteratorStack
-
dstIteratorStack
-
-
Constructor Details
-
BottomUpTransientNodeTransformer
public BottomUpTransientNodeTransformer(SN srcRootNode, BiFunction<SN, AtomicReference<Thread>, DN> nodeMapper)
-
-
Method Details
-
apply
-
isStackEmpty
private final boolean isStackEmpty() -
pushOnStack
-
dropFromStack
private final void dropFromStack() -
processStack
private final void processStack()
-