FeelValue

sealed class FeelValue

Base class for all FEEL values.

FEEL has 9 primary types: Number, String, Boolean, Null, Date, Time, DateTime, Duration, List, Context, Range, Function.

Inheritors

Types

Link copied to clipboard
data class Boolean(val value: Boolean) : FeelValue

Boolean value (true or false).

Link copied to clipboard
object Companion
Link copied to clipboard
data class Context(val entries: Map<String, FeelValue>) : FeelValue

Context value (map with string keys).

Link copied to clipboard
data class Date(val value: LocalDate) : FeelValue

Date value (without time).

Link copied to clipboard
data class DateTime(val value: ZonedDateTime) : FeelValue

Date and time value with optional timezone.

Link copied to clipboard
data class Duration(val dayTimeDuration: Duration?, val yearMonthDuration: Period?) : FeelValue

Duration value (either days/time or years/months).

Link copied to clipboard
data class Function(val name: String, val parameters: List<String>, val body: (List<FeelValue>) -> FeelValue) : FeelValue

Function value.

Link copied to clipboard
data class List(val elements: List<FeelValue>) : FeelValue

List value (1-based indexing).

Link copied to clipboard
object Null : FeelValue

Null value.

Link copied to clipboard
data class Number(val value: BigDecimal) : FeelValue

Arbitrary precision decimal number.

Link copied to clipboard
data class Range(val start: FeelValue, val end: FeelValue, val startInclusive: Boolean, val endInclusive: Boolean) : FeelValue

Range value with start, end, and inclusion flags.

Link copied to clipboard
data class Text(val value: String) : FeelValue

String value (uses single quotes in FEEL syntax).

Link copied to clipboard
data class Time(val value: LocalTime) : FeelValue

Time value (without date).

Functions

Link copied to clipboard
inline fun <T : Any> asType(): T

Convert to Kotlin type T.

Link copied to clipboard

Check if this value is null.

Link copied to clipboard
fun toKotlin(): Any?

Convert FEEL value to Kotlin type.