NullBinaryOperation

fun interface NullBinaryOperation<in Left, in Right, out Out>

A generalized binary operation interface for maybe-null operands.

This is a function interface for the invoke method, which takes in maybe-null left and right operands, and outputs a result.

Construction Helper Functions

Helper functions for constructing binary operations with common patterns are available in this interface's companion object here. Unfortunately, Kotlin's documentation generator Dokka doesn't like to show companion object methods inside interfaces, but all these methods can be called just like a static method (i.e. NullBinaryOperation.combineOrNull(...)).

Types

Link copied to clipboard

Thrown if both arguments in a binary operation are null.

Link copied to clipboard
object Companion

Helper functions for constructing binary operations.

Link copied to clipboard

Thrown by zip if both arguments to the binary operation are defined.

Functions

Link copied to clipboard
abstract operator fun invoke(l: Left?, r: Right?, i: Interval): Out

Calculate the operation.