Class PercentileAggregationFunction.SingleFixed

All Implemented Interfaces:
nz.org.riskscape.engine.rl.agg.AggregationFunction
Enclosing class:
PercentileAggregationFunction

public static class PercentileAggregationFunction.SingleFixed extends PercentileAggregationFunction

A PercentileAggregationFunction that returns a single predefined percentile. The return type matches the input type as there is no need to wrap the result in a struct

  • Constructor Details

    • SingleFixed

      public SingleFixed(Long percentile)
  • Method Details

    • getPercentiles

      protected List<Long> getPercentiles(nz.org.riskscape.engine.rl.RealizationContext context, nz.org.riskscape.rl.ast.FunctionCall fc) throws nz.org.riskscape.problem.ProblemException
      Overrides:
      getPercentiles in class PercentileAggregationFunction
      Returns:
      list of percentiles that need to be found.
      Throws:
      nz.org.riskscape.problem.ProblemException
    • getResultTypeFor

      protected nz.org.riskscape.engine.types.Type getResultTypeFor(nz.org.riskscape.engine.types.Type internalType, List<Long> percentiles) throws nz.org.riskscape.problem.ProblemException
      Overrides:
      getResultTypeFor in class PercentileAggregationFunction
      Throws:
      nz.org.riskscape.problem.ProblemException
    • buildResult

      protected Object buildResult(Object[] results, nz.org.riskscape.engine.types.Type resultType)
      Overrides:
      buildResult in class PercentileAggregationFunction