Class VoidEncoding

All Implemented Interfaces:
Encoding<Void>, NaturalSortAware, Serializable, Comparator<Void>

public class VoidEncoding extends PrimitiveEncoding<Void>
void primitive type.

Doesn't support any values.

See Also:
  • Constructor Details

    • VoidEncoding

      public VoidEncoding(EncodingId encodingId)
  • Method Details

    • withEncodingId

      public VoidEncoding withEncodingId(EncodingId encodingId)
      Description copied from interface: Encoding
      Build an encoding that has the given EncodingId but is otherwise equivalent to this encoding.

      If this encoding already has encodingId, then this method may (but is not required to) return this same instance.

      Parameters:
      encodingId - new encoding's EncodingId, or null for an anonymized encoding
      Returns:
      a version of this encoding with the given EncodingId
    • read

      public Void read(ByteReader reader)
      Description copied from interface: Encoding
      Read a value from the given input.
      Parameters:
      reader - byte input
      Returns:
      field value (possibly null)
    • write

      public void write(ByteWriter writer, Void value)
      Description copied from interface: Encoding
      Write a value to the given output.
      Parameters:
      writer - byte output
      value - value to write (possibly null)
    • skip

      public void skip(ByteReader reader)
      Description copied from interface: Encoding
      Read and discard a byte[] encoded value from the given input.
      Parameters:
      reader - byte input
    • convertNumber

      protected Void convertNumber(Number value)
      Specified by:
      convertNumber in class PrimitiveEncoding<Void>