Package de.xima.fc.stage
Class LocalVariables
java.lang.Object
de.xima.fc.stage.LocalVariables
A set of named variables that can grow over time. Alternatively, this class could also be called a staged builder for
an n-tuple.
This is intended to be used with CompletionStage
to avoid heavy nesting of transformers when values of
previous stages are required for dependent stages. For example:
See the JavaDocs for StageChain
for an example how this can simplify code with stages a lot.
- Since:
- 8.0.0
- Author:
- XIMA MEDIA GmbH
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final class
A set of one local variables.static final class
A set of two local variables.static final class
A set of three local variables.static final class
A set of four local variables.static final class
A set of five local variables.static final class
A set of six local variables.static final class
A set of seven local variables.static final class
A set of eight local variables.static final class
A set of nine local variables. -
Method Summary
Modifier and TypeMethodDescriptionstatic LocalVariables
empty()
static CompletableFuture<LocalVariables>
<X1> LocalVariables.L1<X1>
next
(X1 x1) <X1,
R> StageChain<LocalVariables.L1<X1>, R> nextChain
(StageChain<X1, R> x1) <X1> CompletionStage<LocalVariables.L1<X1>>
nextStage
(CompletionStage<X1> x1)
-
Method Details
-
next
- Type Parameters:
X1
- Type of the next local variable to add.- Parameters:
x1
- The next local variable to add.- Returns:
- A set of local variables which includes the new one.
-
nextChain
- Type Parameters:
X1
- Type of the next local variable to add.- Parameters:
x1
- A completion stage that resolves to the next local variable to add.- Returns:
- A completion stage that resolves to a set of local variables which includes the new one.
-
nextStage
- Type Parameters:
X1
- Type of the next local variable to add.- Parameters:
x1
- A completion stage that resolves to the next local variable to add.- Returns:
- A completion stage that resolves to a set of local variables which includes the new one.
-
empty
- Returns:
- A new set without any variables.
-
emptyStage
- Returns:
- A completion stage for a new set without any variables.
-