org.apache.avro.specific
Class SpecificRecordBase

java.lang.Object
  extended by org.apache.avro.specific.SpecificRecordBase
All Implemented Interfaces:
Comparable<SpecificRecord>, GenericContainer, IndexedRecord, SpecificRecord
Direct Known Subclasses:
HandshakeRequest, HandshakeResponse, Span, TimestampedEvent

public abstract class SpecificRecordBase
extends Object
implements SpecificRecord, Comparable<SpecificRecord>

Base class for generated record classes.


Constructor Summary
SpecificRecordBase()
           
 
Method Summary
 int compareTo(SpecificRecord that)
           
 boolean equals(Object that)
           
abstract  Object get(int field)
          Return the value of a field given its position in the schema.
abstract  Schema getSchema()
          The schema of this instance.
 int hashCode()
           
abstract  void put(int field, Object value)
          Set the value of a field given its position in the schema.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SpecificRecordBase

public SpecificRecordBase()
Method Detail

getSchema

public abstract Schema getSchema()
Description copied from interface: GenericContainer
The schema of this instance.

Specified by:
getSchema in interface GenericContainer

get

public abstract Object get(int field)
Description copied from interface: IndexedRecord
Return 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 DatumWriter implementations.

Specified by:
get in interface IndexedRecord

put

public abstract void put(int field,
                         Object value)
Description copied from interface: IndexedRecord
Set 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 DatumReader implementations.

Specified by:
put in interface IndexedRecord

equals

public boolean equals(Object that)
Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object

compareTo

public int compareTo(SpecificRecord that)
Specified by:
compareTo in interface Comparable<SpecificRecord>

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2011 The Apache Software Foundation. All Rights Reserved.