Package dev.omnist.document
Interface Scalar
- All Known Implementing Classes:
Scalar.BooleanScalar,Scalar.DateScalar,Scalar.DateTimeScalar,Scalar.IntegerScalar,Scalar.NumberScalar,Scalar.StringScalar,Scalar.TimeScalar
public sealed interface Scalar
extends Value
permits Scalar.StringScalar, Scalar.IntegerScalar, Scalar.NumberScalar, Scalar.BooleanScalar, Scalar.DateScalar, Scalar.TimeScalar, Scalar.DateTimeScalar
Represents a scalar value in the Omnist Document model (omnist-spec §2.2.1).
scalar-value = string | integer | number | boolean | date | time | datetime
The seven concrete variants are each a distinct record implementing this interface.
Use kind() for uniform dispatch, or use instanceof pattern-matching
for variant-specific access.
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic final recordA scalar holding a boolean value (omnist-spec §2.2.1, typeboolean).static final recordA scalar holding a calendar date without a time component (omnist-spec §2.2.1, typedate).static final recordA scalar holding a date-time with an optional UTC offset (omnist-spec §2.2.1, typedatetime).static final recordA scalar holding an arbitrary-precision integer value (omnist-spec §2.2.1, typeinteger).static final recordA scalar holding an IEEE-754 64-bit floating-point number (omnist-spec §2.2.1, typenumber).static final recordA scalar holding a Unicode text value (omnist-spec §2.2.1, typestring).static final recordA scalar holding a time-of-day with an optional UTC offset (omnist-spec §2.2.1, typetime).Nested classes/interfaces inherited from interface dev.omnist.document.Value
Value.NullValue -
Field Summary
-
Method Summary
Modifier and TypeMethodDescriptionkind()Returns theScalarKindidentifying which of the seven scalar types this value is.
-
Method Details
-
kind
ScalarKind kind()Returns theScalarKindidentifying which of the seven scalar types this value is. Never returnsnull.
-