public static class GenericData.Record extends Object implements GenericRecord, Comparable<GenericData.Record>
GenericRecord. Note that this implementation
does not fill in default values for fields if they are not specified; use GenericRecordBuilder in that case.GenericRecordBuilder| Constructor and Description |
|---|
GenericData.Record(GenericData.Record other,
boolean deepCopy) |
GenericData.Record(Schema schema) |
| Modifier and Type | Method and Description |
|---|---|
int |
compareTo(GenericData.Record that) |
boolean |
equals(Object o) |
Object |
get(int i)
Return the value of a field given its position in the schema.
|
Object |
get(String key)
Return the value of a field given its name.
|
Schema |
getSchema()
The schema of this instance.
|
int |
hashCode() |
void |
put(int i,
Object v)
Set the value of a field given its position in the schema.
|
void |
put(String key,
Object value)
Set the value of a field given its name.
|
String |
toString() |
public GenericData.Record(Schema schema)
public GenericData.Record(GenericData.Record other, boolean deepCopy)
public Schema getSchema()
GenericContainergetSchema in interface GenericContainerpublic void put(String key, Object value)
GenericRecordput in interface GenericRecordpublic void put(int i,
Object v)
IndexedRecordThis method is not meant to be called by user code, but only by DatumReader implementations.
put in interface IndexedRecordpublic Object get(String key)
GenericRecordget in interface GenericRecordpublic Object get(int i)
IndexedRecordThis method is not meant to be called by user code, but only by DatumWriter implementations.
get in interface IndexedRecordpublic int compareTo(GenericData.Record that)
compareTo in interface Comparable<GenericData.Record>Copyright © 2009-2014 The Apache Software Foundation. All Rights Reserved.