Class Tuple4Encoding<V1,V2,V3,V4>

java.lang.Object
io.permazen.encoding.AbstractEncoding<T>
io.permazen.encoding.TupleEncoding<Tuple4<V1,V2,V3,V4>>
io.permazen.encoding.Tuple4Encoding<V1,V2,V3,V4>
All Implemented Interfaces:
Encoding<Tuple4<V1,V2,V3,V4>>, NaturalSortAware, Serializable, Comparator<Tuple4<V1,V2,V3,V4>>

public class Tuple4Encoding<V1,V2,V3,V4> extends TupleEncoding<Tuple4<V1,V2,V3,V4>>
Composite encoding constructed from the concatenation of four component encodings.
See Also:
  • Constructor Details

    • Tuple4Encoding

      public Tuple4Encoding(EncodingId encodingId, Encoding<V1> value1Encoding, Encoding<V2> value2Encoding, Encoding<V3> value3Encoding, Encoding<V4> value4Encoding)
      Constructor.
      Parameters:
      encodingId - encoding ID, or null for an anonymous instance
      value1Encoding - component value encoding
      value2Encoding - component value encoding
      value3Encoding - component value encoding
      value4Encoding - component value encoding
      Throws:
      IllegalArgumentException - if any component value encoding is null
  • Method Details

    • withEncodingId

      public Tuple4Encoding<V1,V2,V3,V4> 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
    • createTuple

      protected Tuple4<V1,V2,V3,V4> createTuple(Object[] values)
      Specified by:
      createTuple in class TupleEncoding<Tuple4<V1,V2,V3,V4>>