io.github.gaming32.pipeline.iteratorbuilder.IfStatement Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of pipeline Show documentation
Show all versions of pipeline Show documentation
Library for performing fluent-style operations on Java objects.
It also provides a fluent format for creating generators.
The newest version!
package io.github.gaming32.pipeline.iteratorbuilder;
import java.util.ArrayList;
import java.util.List;
import java.util.function.BooleanSupplier;
class IfStatement implements Statement {
public static final class ConditionStatementListPair {
final BooleanSupplier condition;
final StatementList children;
public ConditionStatementListPair(BooleanSupplier condition, StatementList children) {
this.condition = condition;
this.children = children;
}
}
final BooleanSupplier condition;
final StatementList ifTrue;
final List> otherOptions;
StatementList ifFalse;
public IfStatement(BooleanSupplier condition, StatementList ifTrue) {
this.condition = condition;
this.ifTrue = ifTrue;
this.otherOptions = new ArrayList<>();
this.ifFalse = null;
}
}