Class YearMonthType

  • All Implemented Interfaces:
    java.lang.Comparable<DataType>

    public final class YearMonthType
    extends DataType
    Provides binary serialization/de-serialization of java.time.YearMonth values.
    Author:
    Charles W. Rapp
    • Field Detail

      • BYTES

        public static final int BYTES
        A YearMonth requires 8 bytes for encoding.
        See Also:
        Constant Field Values
    • Method Detail

      • createSerializer

        protected void createSerializer​(MessageType.MessageField field,
                                        java.lang.String fieldName,
                                        java.lang.String indent,
                                        java.util.Formatter output)
        Adds the Java code used to serialize a Period instance to a ByteBuffer.
        Specified by:
        createSerializer in class DataType
        Parameters:
        field - message field.
        fieldName - the Period message field name.
        indent - indent code by this many spaces.
        output - output code to here.
      • createDeserializer

        protected void createDeserializer​(MessageType.MessageField field,
                                          java.lang.String fieldName,
                                          java.lang.String indent,
                                          java.util.Formatter output,
                                          boolean useBuilder)
        Adds the Java code used to de-serialize a Period instance from a ByteBuffer.
        Specified by:
        createDeserializer in class DataType
        Parameters:
        field - message field.
        fieldName - the Period message field name.
        indent - indent code by this many spaces.
        output - output code to here.
        useBuilder - if true then fieldName is a builder method name; otherwise a local variable.