org.apache.tinkerpop.gremlin.structure.io.binary.types

## Class EnumSerializer<E extends Enum>

- java.lang.Object
- - org.apache.tinkerpop.gremlin.structure.io.binary.types.SimpleTypeSerializer<E>
  - - org.apache.tinkerpop.gremlin.structure.io.binary.types.EnumSerializer<E>

- All Implemented Interfaces:
    TypeSerializer<E>

      public class EnumSerializer<E extends Enum>
      extends SimpleTypeSerializer<E>

  Generalized serializer for {#code Enum} value types.
  Author:
    Stephen Mallette (http://stephen.genoprime.com)

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static EnumSerializer<SackFunctions.Barrier>` | `BarrierSerializer`
    `static EnumSerializer<VertexProperty.Cardinality>` | `CardinalitySerializer`
    `static EnumSerializer<Column>` | `ColumnSerializer`
    `static EnumSerializer<Direction>` | `DirectionSerializer`
    `static EnumSerializer<Operator>` | `OperatorSerializer`
    `static EnumSerializer<Order>` | `OrderSerializer`
    `static EnumSerializer<TraversalOptionParent.Pick>` | `PickSerializer`
    `static EnumSerializer<Pop>` | `PopSerializer`
    `static EnumSerializer<Scope>` | `ScopeSerializer`
    `static EnumSerializer<T>` | `TSerializer`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `protected E` | `readValue(Buffer buffer, GraphBinaryReader context)` Reads a non-nullable value according to the type format.
    `protected void` | `writeValue(E value, Buffer buffer, GraphBinaryWriter context)` Writes a non-nullable value into a buffer using the provided allocator.

    - ### Methods inherited from class org.apache.tinkerpop.gremlin.structure.io.binary.types.SimpleTypeSerializer

      `getDataType, read, readValue, write, writeValue`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### BarrierSerializer

          public static final EnumSerializer<SackFunctions.Barrier> BarrierSerializer

    - #### CardinalitySerializer

          public static final EnumSerializer<VertexProperty.Cardinality> CardinalitySerializer

    - #### ColumnSerializer

          public static final EnumSerializer<Column> ColumnSerializer

    - #### DirectionSerializer

          public static final EnumSerializer<Direction> DirectionSerializer

    - #### OperatorSerializer

          public static final EnumSerializer<Operator> OperatorSerializer

    - #### OrderSerializer

          public static final EnumSerializer<Order> OrderSerializer

    - #### PickSerializer

          public static final EnumSerializer<TraversalOptionParent.Pick> PickSerializer

    - #### PopSerializer

          public static final EnumSerializer<Pop> PopSerializer

    - #### ScopeSerializer

          public static final EnumSerializer<Scope> ScopeSerializer

    - #### TSerializer

          public static final EnumSerializer<T> TSerializer

  - ### Method Detail

    - #### readValue

          protected E readValue(Buffer buffer,
                                GraphBinaryReader context)
                         throws IOException

      Description copied from class: `SimpleTypeSerializer`
      Reads a non-nullable value according to the type format.
      Specified by:
        `readValue` in class `SimpleTypeSerializer<E extends Enum>`
      Parameters:
        `buffer` - A buffer which reader index has been set to the beginning of the {value}.
        `context` - The binary writer.
      Returns:
      Throws:
        `IOException`

    - #### writeValue

          protected void writeValue(E value,
                                    Buffer buffer,
                                    GraphBinaryWriter context)
                             throws IOException

      Description copied from class: `SimpleTypeSerializer`
      Writes a non-nullable value into a buffer using the provided allocator.
      Specified by:
        `writeValue` in class `SimpleTypeSerializer<E extends Enum>`
      Parameters:
        `value` - A non-nullable value.
        `buffer` - The buffer allocator to use.
        `context` - The binary writer.
      Throws:
        `IOException`

Copyright © 2013–2022 Apache Software Foundation. All rights reserved.