Enum Class Document.EntryType
- All Implemented Interfaces:
Serializable, Comparable<Document.EntryType>, Constable
- Enclosing class:
Document
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 identifiersNUMERIC– numeric values such as integers, floats, or decimalsBOOLEAN– boolean values:trueorfalseNULL– explicitly null entries (i.e., JSONnull)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:
-
Nested Class Summary
Nested classes/interfaces inherited from class Enum
Enum.EnumDesc<E> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionRepresents boolean values:trueorfalse.Represents empty arrays (e.g.,[]).Represents empty objects (e.g.,{}).Represents explicitlynullentries.Represents numeric values including integers and decimals (e.g.,42,3.14).Represents textual values such as plain strings (e.g.,"hello"). -
Method Summary
Modifier and TypeMethodDescriptionstatic Document.EntryTypedeserialize(byte b) Deserializes a byte into anDocument.EntryTypeenum instance.byteSerializes this entry type to a single byte.static Document.EntryTypeReturns the enum constant of this class with the specified name.static Document.EntryType[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
TEXT
Represents textual values such as plain strings (e.g.,"hello"). -
NUMERIC
Represents numeric values including integers and decimals (e.g.,42,3.14). -
BOOLEAN
Represents boolean values:trueorfalse. -
NULL
Represents explicitlynullentries. -
EMPTY_ARRAY
Represents empty arrays (e.g.,[]). -
EMPTY_OBJECT
Represents empty objects (e.g.,{}).
-
-
Method Details
-
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
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 nameNullPointerException- 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
Deserializes a byte into anDocument.EntryTypeenum instance.- Parameters:
b- the serialized byte value- Returns:
- corresponding
Document.EntryType - Throws:
IllegalArgumentException- if the byte value is unrecognized
-