Class OverloadedAggregatingMathsFunction

java.lang.Object
nz.org.riskscape.engine.function.BaseMathsFunction
nz.org.riskscape.engine.function.maths.OverloadedAggregatingMathsFunction
All Implemented Interfaces:
AutoCloseable, nz.org.riskscape.engine.function.IdentifiedFunction, nz.org.riskscape.engine.function.RiskscapeFunction, nz.org.riskscape.engine.function.UntypedFunction, nz.org.riskscape.engine.Identified, nz.org.riskscape.engine.rl.RealizableFunction
Direct Known Subclasses:
Max, Min

public abstract class OverloadedAggregatingMathsFunction extends BaseMathsFunction implements nz.org.riskscape.engine.rl.RealizableFunction

Base class for math functions that can be used as an AggregationFunction and also called directly with both single list argument (as an aggregating function) or with two numeric arguments.

  • Nested Class Summary

    Nested classes/interfaces inherited from interface nz.org.riskscape.engine.function.IdentifiedFunction

    nz.org.riskscape.engine.function.IdentifiedFunction.Category, nz.org.riskscape.engine.function.IdentifiedFunction.Wrapping

    Nested classes/interfaces inherited from interface nz.org.riskscape.engine.rl.RealizableFunction

    nz.org.riskscape.engine.rl.RealizableFunction.MetadataIdentifiedRealizableFunction
  • Field Summary

    Fields inherited from class nz.org.riskscape.engine.function.BaseMathsFunction

    description

    Fields inherited from interface nz.org.riskscape.engine.function.RiskscapeFunction

    BUILT_IN
  • Constructor Summary

    Constructors
    Constructor
    Description
    OverloadedAggregatingMathsFunction(nz.org.riskscape.engine.rl.agg.AggregationFunction aggFunction)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    Optional<nz.org.riskscape.engine.rl.agg.AggregationFunction>
     
    protected abstract List<nz.org.riskscape.engine.function.RiskscapeFunction>
     
    List<nz.org.riskscape.engine.types.Type>
     
    nz.org.riskscape.engine.types.Type
     
    nz.org.riskscape.problem.ResultOrProblems<nz.org.riskscape.engine.function.RiskscapeFunction>
    realize(nz.org.riskscape.engine.rl.RealizationContext context, nz.org.riskscape.rl.ast.FunctionCall functionCall, List<nz.org.riskscape.engine.types.Type> givenTypes)
     

    Methods inherited from class nz.org.riskscape.engine.function.BaseMathsFunction

    call, getCategory, getDescription, getId, getSource, wrapping, wrapping, wrapping

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface nz.org.riskscape.engine.Identified

    getIdentifiedClass

    Methods inherited from interface nz.org.riskscape.engine.function.IdentifiedFunction

    infoOutput, isBuiltin, toEntity

    Methods inherited from interface nz.org.riskscape.engine.function.RiskscapeFunction

    builtin, getArguments, getOverloaded, getRealizable, getTypesFromArguments, identified, identified, isA, setProblemReporter, validate

    Methods inherited from interface nz.org.riskscape.engine.function.UntypedFunction

    close
  • Constructor Details

    • OverloadedAggregatingMathsFunction

      public OverloadedAggregatingMathsFunction(nz.org.riskscape.engine.rl.agg.AggregationFunction aggFunction)
  • Method Details

    • getAlternatives

      protected abstract List<nz.org.riskscape.engine.function.RiskscapeFunction> getAlternatives()
      Returns:
      list of functions for the alternative numeric arguments that this function supports
    • getArgumentTypes

      public List<nz.org.riskscape.engine.types.Type> getArgumentTypes()
      Specified by:
      getArgumentTypes in interface nz.org.riskscape.engine.function.RiskscapeFunction
    • getReturnType

      public nz.org.riskscape.engine.types.Type getReturnType()
      Specified by:
      getReturnType in interface nz.org.riskscape.engine.function.RiskscapeFunction
    • realize

      public nz.org.riskscape.problem.ResultOrProblems<nz.org.riskscape.engine.function.RiskscapeFunction> realize(nz.org.riskscape.engine.rl.RealizationContext context, nz.org.riskscape.rl.ast.FunctionCall functionCall, List<nz.org.riskscape.engine.types.Type> givenTypes)
      Specified by:
      realize in interface nz.org.riskscape.engine.rl.RealizableFunction
    • getAggregationFunction

      public Optional<nz.org.riskscape.engine.rl.agg.AggregationFunction> getAggregationFunction()
      Specified by:
      getAggregationFunction in interface nz.org.riskscape.engine.function.RiskscapeFunction