Class CombinedOperator.Pipe

java.lang.Object
org.cyclops.integrateddynamics.core.evaluate.operator.CombinedOperator.OperatorsFunction
org.cyclops.integrateddynamics.core.evaluate.operator.CombinedOperator.Pipe
All Implemented Interfaces:
OperatorBase.IFunction
Enclosing class:
CombinedOperator

public static class CombinedOperator.Pipe extends CombinedOperator.OperatorsFunction
  • Constructor Details

  • Method Details

    • evaluate

      public IValue evaluate(OperatorBase.SafeVariablesGetter variables) throws EvaluationException
      Description copied from interface: OperatorBase.IFunction
      Evaluate this function for the given input.
      Parameters:
      variables - The input variables holder.
      Returns:
      The output value.
      Throws:
      EvaluationException - If an exception occurs while evaluating
    • pipeVariablesToOperators

      public static IValue pipeVariablesToOperators(IVariable[] allVariables, IOperator[] operators) throws EvaluationException
      Pass the first variable to all n-1 first operators. Prepend the results of these operators to the variables array. Pass the final variables array to the last operator, and return the result.
      Parameters:
      allVariables - The input variables.
      operators - The operators to apply to. The n-1 first ones are the inputs, and the last one is the target to pipe to.
      Returns:
      The final result.
      Throws:
      EvaluationException - If evaluation failed.
    • getPipedInputOutputTypes

      public static org.apache.commons.lang3.tuple.Pair<IValueType[],IValueType> getPipedInputOutputTypes(IOperator[] operators)
      Determine the input types and output type for the given operators.
      Parameters:
      operators - The operators to apply to. The n-1 first ones are the inputs, and the last one is the target to pipe to.
      Returns:
      The input types and output type.
    • asOperator

      public static CombinedOperator asOperator(IOperator... operators)
    • asOperator

      public static CombinedOperator asOperator(CombinedOperator.OperatorsFunction function, String symbol, String operatorName, String interactName, IOperator... operators)