| Modifier and Type | Field and Description |
|---|---|
| private final GenericData. |
| Access | Constructor and Description |
|---|---|
| public | GenericRecordBuilder(Schema
the schema associated with the record class. schema)Creates a GenericRecordBuilder for building Record instances. |
| public | GenericRecordBuilder(GenericRecordBuilder
the GenericRecordBuilder to copy. other)Creates a GenericRecordBuilder by copying an existing GenericRecordBuilder. |
| public | GenericRecordBuilder(GenericData.
the record instance to copy. otherCreates a GenericRecordBuilder by copying an existing record instance. |
| Modifier and Type | Method and Description |
|---|---|
| public GenericData. | build()
Implements org. |
| public GenericRecordBuilder | |
| public GenericRecordBuilder | |
| protected GenericRecordBuilder | Returns: a reference to the RecordBuilder.the position of the field to clear. pos)Clears the value of the given field. |
| public boolean | |
| public Object | |
| public Object | |
| protected Object | Returns: the value of the field with the given position, or null if not set.the position of the field to get. pos)Gets the value of a field. |
| private Object | Returns: the value set for the given field, the field's default value, or null.the field whose value should be retrieved. fieldGets the value of the given field. |
| public boolean | |
| public boolean | |
| protected boolean | Returns: true if the given field is non-null; false otherwise.the position of the field to check. pos)Checks whether a field has been set. |
| public int | hashCode()
Returns a hash code value for the object.
|
| public GenericRecordBuilder | |
| public GenericRecordBuilder | |
| protected GenericRecordBuilder | |
| private GenericRecordBuilder |
| record | back to summary |
|---|---|
| private final GenericData. | |
| GenericRecordBuilder | back to summary |
|---|---|
| public GenericRecordBuilder(Schema schema) Creates a GenericRecordBuilder for building Record instances.
| |
| GenericRecordBuilder | back to summary |
|---|---|
| public GenericRecordBuilder(GenericRecordBuilder other) Creates a GenericRecordBuilder by copying an existing GenericRecordBuilder.
| |
| GenericRecordBuilder | back to summary |
|---|---|
| public GenericRecordBuilder(GenericData. Creates a GenericRecordBuilder by copying an existing record instance.
| |
| build | back to summary |
|---|---|
| public GenericData. Implements org. Doc from org. Constructs a new instance using the values set in the RecordBuilder. If a particular value was not set and the schema defines a default value, the default value will be used.
| |
| clear | back to summary |
|---|---|
| public GenericRecordBuilder clear(String fieldName) Clears the value of the given field.
| |
| clear | back to summary |
|---|---|
| public GenericRecordBuilder clear(Schema. Clears the value of the given field.
| |
| clear | back to summary |
|---|---|
| protected GenericRecordBuilder clear(int pos) Clears the value of the given field.
| |
| equals | back to summary |
|---|---|
| public boolean equals(Object obj) Overrides org. Doc from java. Indicates whether some other object is "equal to" this one.
The
An equivalence relation partitions the elements it operates on into equivalence classes; all the members of an equivalence class are equal to each other. Members of an equivalence class are substitutable for each other, at least for some purposes. | |
| get | back to summary |
|---|---|
| public Object get(String fieldName) Gets the value of a field. | |
| get | back to summary |
|---|---|
| public Object get(Schema. Gets the value of a field. | |
| get | back to summary |
|---|---|
| protected Object get(int pos) Gets the value of a field.
| |
| getWithDefault | back to summary |
|---|---|
| private Object getWithDefault(Schema. Gets the value of the given field. If the field has been set, the set value is returned (even if it's null). If the field hasn't been set and has a default value, the default value is returned. | |
| has | back to summary |
|---|---|
| public boolean has(String fieldName) Checks whether a field has been set.
| |
| has | back to summary |
|---|---|
| public boolean has(Schema. Checks whether a field has been set. | |
| has | back to summary |
|---|---|
| protected boolean has(int pos) Checks whether a field has been set.
| |
| hashCode | back to summary |
|---|---|
| public int hashCode() Overrides org. Doc from java. Returns a hash code value for the object. This method is
supported for the benefit of hash tables such as those provided by
The general contract of
| |
| set | back to summary |
|---|---|
| public GenericRecordBuilder set(String fieldName, Object value) Sets the value of a field.
| |
| set | back to summary |
|---|---|
| public GenericRecordBuilder set(Schema. Sets the value of a field.
| |
| set | back to summary |
|---|---|
| protected GenericRecordBuilder set(int pos, Object value) Sets the value of a field.
| |
| set | back to summary |
|---|---|
| private GenericRecordBuilder set(Schema. Sets the value of a field.
| |