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

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

Functions

Link copied to clipboard
abstract fun simplify(): BooleanExpression<T>

This is not super well defined but works well enough for our simple use cases

Inheritors

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

Extensions

Link copied to clipboard
fun <T : Any> BooleanExpression<T>.and(vararg other: BooleanExpression<T>): BooleanExpression<T>
Link copied to clipboard
fun <T : Any> BooleanExpression<T>.containsPossibleTypes(): Boolean
Link copied to clipboard
fun <T : Any> BooleanExpression<T>.evaluate(block: (T) -> Boolean): Boolean
fun BooleanExpression<BTerm>.evaluate(variables: Set<String>, typename: String?): Boolean
fun BooleanExpression<BTerm>.evaluate(    variables: Set<String>,     typename: String?,     adapterContext: AdapterContext,     path: List<Any>?): Boolean
Link copied to clipboard
fun <T : Any, U : Any> BooleanExpression<T>.firstElementOfType(type: KClass<U>): U?
Link copied to clipboard
fun <T : Any> BooleanExpression<T>.or(vararg other: BooleanExpression<T>): BooleanExpression<T>