Class Schema.Field

  • All Implemented Interfaces:
    java.io.Serializable
    Enclosing class:
    Schema

    public abstract static class Schema.Field
    extends java.lang.Object
    implements java.io.Serializable
    Field of a row. Contains the Schema.FieldType along with associated metadata.
    See Also:
    Serialized Form
    • Constructor Detail

      • Field

        public Field()
    • Method Detail

      • getName

        public abstract java.lang.String getName()
        Returns the field name.
      • getDescription

        public abstract java.lang.String getDescription()
        Returns the field's description.
      • nullable

        public static Schema.Field nullable​(java.lang.String name,
                                            Schema.FieldType fieldType)
        Return's a nullable field with the give name and type.
      • withName

        public Schema.Field withName​(java.lang.String name)
        Returns a copy of the Field with the name set.
      • withDescription

        public Schema.Field withDescription​(java.lang.String description)
        Returns a copy of the Field with the description set.
      • withNullable

        public Schema.Field withNullable​(boolean isNullable)
        Returns a copy of the Field with isNullable set.
      • equals

        public final boolean equals​(@Nullable java.lang.Object o)
        Overrides:
        equals in class java.lang.Object
      • typesEqual

        public boolean typesEqual​(Schema.Field other)
        Returns true if two fields are equal, ignoring name and description.
      • hashCode

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