Class Field

  • All Implemented Interfaces:
    java.io.Serializable

    public class Field
    extends java.lang.Object
    implements java.io.Serializable
    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_DOC

        public static final Name FIELD_NAME_DOC
      • FIELD_NAME_TYPE

        public static final Name FIELD_NAME_TYPE
      • FIELD_NAME_DEFAULT

        public static final Name FIELD_NAME_DEFAULT
      • FIELD_NAME_ORDER

        public static final Name FIELD_NAME_ORDER
      • FIELD_NAME_ALIASES

        public static final Name FIELD_NAME_ALIASES
      • FIELD_NAME_ANNOTATIONS

        public static final Name FIELD_NAME_ANNOTATIONS
      • name

        public final java.lang.String name
        a JSON string providing the name of the field
      • doc

        public final Opt<java.lang.String> doc
        a JSON string describing this field for users
      • type

        public final Schema type
        a schema
      • default_

        public final Opt<Value> default_
        default value for this field, only used when reading instances that lack the field for schema evolution purposes
      • order

        public final Opt<Order> order
        specifies how this field impacts sort ordering of this record
      • aliases

        public final Opt<java.util.List<java.lang.String>> aliases
        a JSON array of strings, providing alternate names for this field
      • annotations

        public final java.util.Map<java.lang.String,​Value> annotations
        Any additional key/value pairs attached to the field
    • Constructor Detail

      • Field

        public Field​(java.lang.String name,
                     Opt<java.lang.String> doc,
                     Schema type,
                     Opt<Value> default_,
                     Opt<Order> order,
                     Opt<java.util.List<java.lang.String>> aliases,
                     java.util.Map<java.lang.String,​Value> annotations)
    • 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
      • withName

        public Field withName​(java.lang.String name)
      • withDoc

        public Field withDoc​(Opt<java.lang.String> doc)
      • withDefault

        public Field withDefault​(Opt<Value> default_)
      • withAliases

        public Field withAliases​(Opt<java.util.List<java.lang.String>> aliases)
      • withAnnotations

        public Field withAnnotations​(java.util.Map<java.lang.String,​Value> annotations)