AggregatorInputHandler

The input handler of the aggregator, which handles type checks, conversions, and preprocessing of a single sequence of input values. It can also calculate a specific value type from the input values or input types if the (specific) type is not known.

Inheritors

Properties

Link copied to clipboard

Reference to the aggregator instance.

Link copied to clipboard

The type of the value if the input is empty.

Functions

Link copied to clipboard
abstract fun calculateValueType(valueTypes: Set<KType>): ValueType

If the specific ValueType of the input is not known, but you still want to call aggregate, this function can be called to calculate it by combining the set of known valueTypes.

abstract fun calculateValueType(values: Sequence<Value?>): ValueType

WARNING: HEAVY!

Link copied to clipboard
open fun init(aggregator: Aggregator<Value, Return>)
Link copied to clipboard
abstract fun preprocessAggregation(values: Sequence<Value?>, valueType: ValueType): Pair<Sequence<Value?>, KType>

Preprocesses the input values before aggregation. It's expected that this function converts values to the right valueType.kType if valueType.needsFullConversion.