Interface Scalar

All Superinterfaces:
Document, Target, Value
All Known Implementing Classes:
Scalar.BooleanScalar, Scalar.DateScalar, Scalar.DateTimeScalar, Scalar.IntegerScalar, Scalar.NumberScalar, Scalar.StringScalar, Scalar.TimeScalar

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 Classes
    Modifier and Type
    Interface
    Description
    static final record 
    A scalar holding a boolean value (omnist-spec §2.2.1, type boolean).
    static final record 
    A scalar holding a calendar date without a time component (omnist-spec §2.2.1, type date).
    static final record 
    A scalar holding a date-time with an optional UTC offset (omnist-spec §2.2.1, type datetime).
    static final record 
    A scalar holding an arbitrary-precision integer value (omnist-spec §2.2.1, type integer).
    static final record 
    A scalar holding an IEEE-754 64-bit floating-point number (omnist-spec §2.2.1, type number).
    static final record 
    A scalar holding a Unicode text value (omnist-spec §2.2.1, type string).
    static final record 
    A scalar holding a time-of-day with an optional UTC offset (omnist-spec §2.2.1, type time).

    Nested classes/interfaces inherited from interface dev.omnist.document.Value

    Value.NullValue
  • Field Summary

    Fields inherited from interface dev.omnist.document.Value

    NULL
  • Method Summary

    Modifier and Type
    Method
    Description
    Returns the ScalarKind identifying which of the seven scalar types this value is.
  • Method Details

    • kind

      ScalarKind kind()
      Returns the ScalarKind identifying which of the seven scalar types this value is. Never returns null.