public static class GenericData.Record extends Object implements GenericRecord, Comparable<GenericData.Record>
GenericRecord
.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()
GenericContainer
getSchema
in interface GenericContainer
public void put(String key, Object value)
GenericRecord
put
in interface GenericRecord
public void put(int i, Object v)
IndexedRecord
This method is not meant to be called by user code, but only by DatumReader
implementations.
put
in interface IndexedRecord
public Object get(String key)
GenericRecord
get
in interface GenericRecord
public Object get(int i)
IndexedRecord
This method is not meant to be called by user code, but only by DatumWriter
implementations.
get
in interface IndexedRecord
public int compareTo(GenericData.Record that)
compareTo
in interface Comparable<GenericData.Record>
Copyright © 2009-2013 The Apache Software Foundation. All Rights Reserved.