Enum Class Document.EntryType

java.lang.Object
java.lang.Enum<Document.EntryType>
io.fluxzero.common.search.Document.EntryType
All Implemented Interfaces:
Serializable, Comparable<Document.EntryType>, Constable
Enclosing class:
Document

public static enum Document.EntryType extends Enum<Document.EntryType>
Enumerates the supported types of values that can appear in a Document entry.

These types provide a normalized internal representation of different JSON-compatible values, allowing for efficient indexing, filtering, and serialization within the Fluxzero document store.

Supported Types

  • TEXT – textual content, including strings and non-numeric identifiers
  • NUMERIC – numeric values such as integers, floats, or decimals
  • BOOLEAN – boolean values: true or false
  • NULL – explicitly null entries (i.e., JSON null)
  • EMPTY_ARRAY – empty arrays (e.g. [])
  • EMPTY_OBJECT – empty objects (e.g. {})

Each entry type can be serialized into a compact byte identifier for efficient wire transfer or storage. Use serialize() and deserialize(byte) to convert between enum instances and their byte representation.

See Also:
  • Enum Constant Details

    • TEXT

      public static final Document.EntryType TEXT
      Represents textual values such as plain strings (e.g., "hello").
    • NUMERIC

      public static final Document.EntryType NUMERIC
      Represents numeric values including integers and decimals (e.g., 42, 3.14).
    • BOOLEAN

      public static final Document.EntryType BOOLEAN
      Represents boolean values: true or false.
    • NULL

      public static final Document.EntryType NULL
      Represents explicitly null entries.
    • EMPTY_ARRAY

      public static final Document.EntryType EMPTY_ARRAY
      Represents empty arrays (e.g., []).
    • EMPTY_OBJECT

      public static final Document.EntryType EMPTY_OBJECT
      Represents empty objects (e.g., {}).
  • Method Details

    • values

      public static Document.EntryType[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static Document.EntryType valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null
    • serialize

      public byte serialize()
      Serializes this entry type to a single byte.

      Useful for compact storage or transmission over the wire.

      Returns:
      byte value representing this type
    • deserialize

      public static Document.EntryType deserialize(byte b)
      Deserializes a byte into an Document.EntryType enum instance.
      Parameters:
      b - the serialized byte value
      Returns:
      corresponding Document.EntryType
      Throws:
      IllegalArgumentException - if the byte value is unrecognized