BooleanExpression

sealed class BooleanExpression<out T : Any>

A boolean expression

Parameters

T

the type of the variable elements. This allows representing BooleanExpression that only contain variables and other that may also contain possibleTypes

Types

And
Link copied to clipboard
common
data class And<T : Any>(operands: Set<BooleanExpression<T>>) : BooleanExpression<T>
Element
Link copied to clipboard
common
data class Element<out T : Any>(value: T) : BooleanExpression<T>
False
Link copied to clipboard
common
object False : BooleanExpression<Nothing>
Not
Link copied to clipboard
common
data class Not<out T : Any>(operand: BooleanExpression<T>) : BooleanExpression<T>
Or
Link copied to clipboard
common
data class Or<T : Any>(operands: Set<BooleanExpression<T>>) : BooleanExpression<T>
True
Link copied to clipboard
common
object True : BooleanExpression<Nothing>

Functions

simplify
Link copied to clipboard
common
abstract fun simplify(): BooleanExpression<T>
This is not super well defined but works well enough for our simple use cases

Inheritors

BooleanExpression
Link copied to clipboard
BooleanExpression
Link copied to clipboard
BooleanExpression
Link copied to clipboard
BooleanExpression
Link copied to clipboard
BooleanExpression
Link copied to clipboard
BooleanExpression
Link copied to clipboard

Extensions

and
Link copied to clipboard
common
fun <T : Any> BooleanExpression<T>.and(vararg other: BooleanExpression<T>): BooleanExpression<T>
evaluate
Link copied to clipboard
common
fun <T : Any> BooleanExpression<T>.evaluate(block: (T) -> Boolean): Boolean
fun BooleanExpression<BTerm>.evaluate(variables: Set<String>, typename: String): Boolean
or
Link copied to clipboard
common
fun <T : Any> BooleanExpression<T>.or(vararg other: BooleanExpression<T>): BooleanExpression<T>