Interface Decoder.Terminal<A>

Type Parameters:
A - the type of object to decode
Enclosing interface:
Decoder<A>

public static interface Decoder.Terminal<A>
Can decode an object from a serialized form, but does not return any remaining serialized data.
  • Method Summary

    Modifier and Type
    Method
    Description
    decode(DynamicOps<T> ops, T input)
    Decodes an object from a serialized form, but does not return any remaining serialized data.
    default Decoder<A>
    Returns a new decoder with the logic of this object, discarding any remaining serialized data.
  • Method Details

    • decode

      <T> DataResult<A> decode(DynamicOps<T> ops, T input)
      Decodes an object from a serialized form, but does not return any remaining serialized data.
      Type Parameters:
      T - the type of the serialized form
      Parameters:
      ops - a DynamicOps for the serialized form
      input - the serialized form to decode
      Returns:
      a DataResult containing the decoded object, or an error if the object could not be decoded
    • decoder

      default Decoder<A> decoder()
      Returns a new decoder with the logic of this object, discarding any remaining serialized data.
      Returns:
      a new decoder with the logic of this object, discarding any remaining serialized data