All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.github.gaming32.pipeline.iteratorbuilder.IfStatement Maven / Gradle / Ivy

Go to download

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;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy