public class RecordTypeInfo extends Record
Constructor and Description |
---|
RecordTypeInfo()
Create an empty RecordTypeInfo object.
|
RecordTypeInfo(String name)
Create a RecordTypeInfo object representing a record with the given name
|
Modifier and Type | Method and Description |
---|---|
void |
addField(String fieldName,
TypeID tid)
Add a field.
|
int |
compareTo(Object peer_)
This class doesn't implement Comparable as it's not meant to be used
for anything besides de/serializing.
|
void |
deserialize(RecordInput rin,
String tag)
Deserialize the type information for a record
|
Collection<FieldTypeInfo> |
getFieldTypeInfos()
Return a collection of field type infos
|
String |
getName()
return the name of the record
|
RecordTypeInfo |
getNestedStructTypeInfo(String name)
Return the type info of a nested record.
|
void |
serialize(RecordOutput rout,
String tag)
Serialize the type information for a record
|
void |
setName(String name)
set the name of the record
|
deserialize, readFields, serialize, toString, write
public RecordTypeInfo()
public RecordTypeInfo(String name)
name
- Name of the recordpublic String getName()
public void setName(String name)
public void addField(String fieldName, TypeID tid)
fieldName
- Name of the fieldtid
- Type ID of the fieldpublic Collection<FieldTypeInfo> getFieldTypeInfos()
public RecordTypeInfo getNestedStructTypeInfo(String name)
name
- Name of the nested recordpublic void serialize(RecordOutput rout, String tag) throws IOException
serialize
in class Record
rout
- Record output destinationtag
- record tag (Used only in tagged serialization e.g. XML)IOException
public void deserialize(RecordInput rin, String tag) throws IOException
deserialize
in class Record
rin
- Record input sourcetag
- Record tag (Used only in tagged serialization e.g. XML)IOException
public int compareTo(Object peer_) throws ClassCastException
compareTo
in interface Comparable
compareTo
in class Record
ClassCastException
Copyright © 2010 The Apache Software Foundation