N - Value provided in the NextNode casepublic abstract class FoldContinue<N> extends Object implements CoProduct3<Unit,Unit,N,FoldContinue<N>>
Choice3<Unit, Unit, N>| Constructor and Description |
|---|
FoldContinue() |
| Modifier and Type | Method and Description |
|---|---|
static <N> FoldContinue<N> |
decompose() |
static <N> FoldContinue<N> |
endFold() |
abstract <R> R |
match(Fn1<? super Unit,? extends R> terminateFn,
Fn1<? super Unit,? extends R> decomposeFn,
Fn1<? super N,? extends R> nextNodeFn) |
static <N> FoldContinue<N> |
nextNode(N node)
Provide the next node in a fold.
|
static <N> FoldContinue<N> |
nodeOrDecompose(Maybe<N> node)
Provide the next node if available, otherwise decompose the graph arbitrarily.
|
static <N> FoldContinue<N> |
nodeOrTerminate(Maybe<N> node)
Provide the next node if available, otherwise terminate the fold.
|
public static <N> FoldContinue<N> nextNode(N node)
N - The type of the nodenode - The node to provideFoldContinue with nodepublic static <N> FoldContinue<N> nodeOrTerminate(Maybe<N> node)
N - The type of the nodenode - A Maybe node to provide, if availableN, or a signal to terminate the foldpublic static <N> FoldContinue<N> nodeOrDecompose(Maybe<N> node)
N - The type of the nodenode - A Maybe node to provide, if availableN, or a signal to decompose the graph without a nodepublic static <N> FoldContinue<N> decompose()
N - The type of a node that would have been providedpublic static <N> FoldContinue<N> endFold()
N - The type of a node that would have been providedpublic abstract <R> R match(Fn1<? super Unit,? extends R> terminateFn,
Fn1<? super Unit,? extends R> decomposeFn,
Fn1<? super N,? extends R> nextNodeFn)
match in interface CoProduct3<Unit,Unit,N,FoldContinue<N>>Copyright © 2020. All Rights Reserved.