Class Field

  • All Implemented Interfaces:
    java.io.Serializable

    public class Field
    extends java.lang.Object
    implements java.io.Serializable
    A single field of a message type
    See Also:
    Serialized Form
    • Field Detail

      • TYPE_NAME

        public static final Name TYPE_NAME
      • FIELD_NAME_NAME

        public static final Name FIELD_NAME_NAME
      • FIELD_NAME_JSON_NAME

        public static final Name FIELD_NAME_JSON_NAME
      • FIELD_NAME_TYPE

        public static final Name FIELD_NAME_TYPE
      • FIELD_NAME_NUMBER

        public static final Name FIELD_NAME_NUMBER
      • FIELD_NAME_OPTIONS

        public static final Name FIELD_NAME_OPTIONS
      • name

        public final FieldName name
        The field name
      • jsonName

        public final Opt<java.lang.String> jsonName
        The field JSON name
      • type

        public final FieldType type
        The datatype of the field
      • number

        public final java.lang.Integer number
        The field number
      • options

        public final java.util.List<Option> options
        The protocol buffer options
    • Constructor Detail

      • Field

        public Field​(FieldName name,
                     Opt<java.lang.String> jsonName,
                     FieldType type,
                     java.lang.Integer number,
                     java.util.List<Option> options)
    • Method Detail

      • equals

        public boolean equals​(java.lang.Object other)
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • withJsonName

        public Field withJsonName​(Opt<java.lang.String> jsonName)
      • withNumber

        public Field withNumber​(java.lang.Integer number)
      • withOptions

        public Field withOptions​(java.util.List<Option> options)