Companion

object Companion

Helper functions for constructing binary operations.

Functions

Link copied to clipboard
fun <Left, Right, Out> cases(left: (Left & Any, Interval) -> Out, right: (Right & Any, Interval) -> Out, combine: (Left & Any, Right & Any, Interval) -> Out): NullBinaryOperation<Left, Right, Out>

Constructs an operation from three different cases:

Link copied to clipboard

Constructs an operation that combines the operands of equal type if they are both present. If either operand is not present, the other is passed through unchanged.

Link copied to clipboard

Constructs an operation that combines the operands in some way if they are both present, and produces null if either operand is null.

Link copied to clipboard

Constructs a binary operation which converts either operand to the output if only one is present.

Link copied to clipboard
fun <In, Out> reduce(convert: (new: In & Any, Interval) -> Out, combine: (new: In & Any, acc: Out & Any, Interval) -> Out): NullBinaryOperation<In, Out, Out>

Constructs a binary operation for a reduce-style timeline operation.

Link copied to clipboard

A named version of the default constructor.

Link copied to clipboard

Constructs a binary operation which passes operands through unchanged if only one is present.