public abstract static class Schema.Field
extends java.lang.Object
implements java.io.Serializable
Schema.FieldType
along with associated metadata.Modifier and Type | Class and Description |
---|---|
static class |
Schema.Field.Builder
Builder for
Schema.Field . |
Constructor and Description |
---|
Field() |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(@Nullable java.lang.Object o) |
abstract java.lang.String |
getDescription()
Returns the field's description.
|
abstract java.lang.String |
getName()
Returns the field name.
|
abstract Schema.Options |
getOptions()
Returns the fields
Schema.Options . |
abstract Schema.FieldType |
getType()
Returns the fields
Schema.FieldType . |
int |
hashCode() |
static Schema.Field |
nullable(java.lang.String name,
Schema.FieldType fieldType)
Return's a nullable field with the give name and type.
|
static Schema.Field |
of(java.lang.String name,
Schema.FieldType fieldType)
Return's a field with the give name and type.
|
abstract Schema.Field.Builder |
toBuilder() |
boolean |
typesEqual(Schema.Field other)
Returns true if two fields are equal, ignoring name and description.
|
Schema.Field |
withDescription(java.lang.String description)
Returns a copy of the Field with the description set.
|
Schema.Field |
withName(java.lang.String name)
Returns a copy of the Field with the name set.
|
Schema.Field |
withNullable(boolean isNullable)
Returns a copy of the Field with isNullable set.
|
Schema.Field |
withOptions(Schema.Options.Builder optionsBuilder)
Returns a copy of the Field with the options set.
|
Schema.Field |
withOptions(Schema.Options options)
Returns a copy of the Field with the options set.
|
Schema.Field |
withType(Schema.FieldType fieldType)
Returns a copy of the Field with the
Schema.FieldType set. |
public abstract java.lang.String getName()
public abstract java.lang.String getDescription()
public abstract Schema.FieldType getType()
Schema.FieldType
.public abstract Schema.Options getOptions()
Schema.Options
.public abstract Schema.Field.Builder toBuilder()
public static Schema.Field of(java.lang.String name, Schema.FieldType fieldType)
public static Schema.Field nullable(java.lang.String name, Schema.FieldType fieldType)
public Schema.Field withName(java.lang.String name)
public Schema.Field withDescription(java.lang.String description)
public Schema.Field withType(Schema.FieldType fieldType)
Schema.FieldType
set.public Schema.Field withNullable(boolean isNullable)
public Schema.Field withOptions(Schema.Options options)
public Schema.Field withOptions(Schema.Options.Builder optionsBuilder)
public boolean equals(@Nullable java.lang.Object o)
equals
in class java.lang.Object
public boolean typesEqual(Schema.Field other)
public int hashCode()
hashCode
in class java.lang.Object