Package org.apache.avro.generic
Class GenericData.Record
java.lang.Object
org.apache.avro.generic.GenericData.Record
- All Implemented Interfaces:
Comparable<GenericData.Record>,GenericContainer,GenericRecord,IndexedRecord
- Enclosing class:
GenericData
public static class GenericData.Record
extends Object
implements GenericRecord, Comparable<GenericData.Record>
Default implementation of
GenericRecord. Note that this
implementation does not fill in default values for fields if they are not
specified; use GenericRecordBuilder in that case.- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintcompareTo(GenericData.Record that) booleanget(int i) Return the value of a field given its position in the schema.Return the value of a field given its name.The schema of this instance.inthashCode()voidSet the value of a field given its position in the schema.voidSet the value of a field given its name.toString()Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.apache.avro.generic.GenericRecord
hasField
-
Constructor Details
-
Record
-
Record
-
-
Method Details
-
getSchema
Description copied from interface:GenericContainerThe schema of this instance.- Specified by:
getSchemain interfaceGenericContainer
-
put
Description copied from interface:GenericRecordSet the value of a field given its name.- Specified by:
putin interfaceGenericRecord
-
put
Description copied from interface:IndexedRecordSet the value of a field given its position in the schema.This method is not meant to be called by user code, but only by
DatumReaderimplementations.- Specified by:
putin interfaceIndexedRecord
-
get
Description copied from interface:GenericRecordReturn the value of a field given its name.- Specified by:
getin interfaceGenericRecord
-
get
Description copied from interface:IndexedRecordReturn the value of a field given its position in the schema.This method is not meant to be called by user code, but only by
DatumWriterimplementations.- Specified by:
getin interfaceIndexedRecord
-
equals
-
hashCode
public int hashCode() -
compareTo
- Specified by:
compareToin interfaceComparable<GenericData.Record>
-
toString
-