Enum YearMarshaller

    • Method Detail

      • values

        public static YearMarshaller[] values()
        Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
        for (YearMarshaller c : YearMarshaller.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static YearMarshaller valueOf​(String name)
        Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
        Parameters:
        name - the name of the enum constant to be returned.
        Returns:
        the enum constant with the specified name
        Throws:
        IllegalArgumentException - if this enum type has no constant with the specified name
        NullPointerException - if the argument is null
      • readField

        public Year readField​(ProtoStreamReader reader,
                              int index,
                              Year year)
                       throws IOException
        Description copied from interface: FieldSetMarshaller
        Reads a single field from the specified reader at the specified index.
        Specified by:
        readField in interface FieldSetMarshaller<Year,​Year>
        Parameters:
        reader - a ProtoStream reader
        index - the field index
        year - the builder to be populated with the read field
        Returns:
        the builder containing the read field
        Throws:
        IOException - if the field could not be read
      • writeFields

        public void writeFields​(ProtoStreamWriter writer,
                                int startIndex,
                                Year value)
                         throws IOException
        Description copied from interface: FieldSetMarshaller
        Writes the set of fields from the specified object to the specified writer beginning at the specified index.
        Specified by:
        writeFields in interface FieldSetMarshaller<Year,​Year>
        Parameters:
        writer - a ProtoStream writer
        startIndex - the start index for the embedded fields
        value - the value to be written
        Throws:
        IOException - if the value could not be written