Class BinaryOperatorFunction<T>

java.lang.Object
nz.org.riskscape.engine.function.BinaryOperatorFunction<T>
All Implemented Interfaces:
AutoCloseable, RiskscapeFunction, UntypedFunction

public class BinaryOperatorFunction<T> extends Object implements RiskscapeFunction

Convenience RiskscapeFunction for adding metadata to a java BinaryOperator function, specifically meant for a riskscape language BinaryOperation

  • Constructor Details

    • BinaryOperatorFunction

      public BinaryOperatorFunction(TokenTypes operation, BinaryOperator<T> operator, Class<T> javaType)
    • BinaryOperatorFunction

      public BinaryOperatorFunction(TokenTypes operation, BinaryOperator<T> operator, Class<T> javaType, Type riskscapeType)
      Parameters:
      operation - the corresponding lexing token for the operator
      operator - the function to call
      javaType - the java type that the operator accepts and returns
      riskscapeType - the riskscape type that the operator accepts and returns
  • Method Details