Class SumAsDoubleSimulator

  • All Implemented Interfaces:
    rocks.frieler.kraftsql.testing.engine.ExpressionSimulator

    
    public final class SumAsDoubleSimulator<E extends Engine<E>>
    extends AggregationSimulator<E, Double, Sum.Companion.SumAsDouble<E>>
                        

    Simulator for SumAsDouble expressions, the rocks.frieler.kraftsql.expressions.Sum that results in a double-valued result.

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private final KClass<out Sum.Companion.SumAsDouble<E>> expression
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      KClass<out Sum.Companion.SumAsDouble<E>> getExpression()
      Function1<List<DataRow>, Double> simulateAggregation(Sum.Companion.SumAsDouble<E> expression) Provides a Kotlin simulation of the given Expression as an aggregation to be applied to multiple DataRows.
      • Methods inherited from class rocks.frieler.kraftsql.testing.engine.AggregationSimulator

        simulateExpression
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • SumAsDoubleSimulator

        SumAsDoubleSimulator()
    • Method Detail

      • simulateAggregation

         Function1<List<DataRow>, Double> simulateAggregation(Sum.Companion.SumAsDouble<E> expression)

        Provides a Kotlin simulation of the given Expression as an aggregation to be applied to multiple DataRows.

        For the Expression to aggregate multiple DataRows, it must either be an rocks.frieler.kraftsql.expressions.Aggregation, one of the groupExpressions or the same must apply to all its sub-expressions.

        Returns:

        a function that simulates the Expression