Package org.apache.thrift
Interface TBase<T extends TBase<?,?>,F extends TFieldIdEnum>
-
- All Superinterfaces:
java.lang.Comparable<T>,java.io.Serializable
- All Known Implementing Classes:
TUnion
public interface TBase<T extends TBase<?,?>,F extends TFieldIdEnum> extends java.lang.Comparable<T>, java.io.SerializableGeneric base interface for generated Thrift objects.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidclear()Return to the state of having just been initialized, as though you had just called the default constructor.TBase<T,F>deepCopy()FfieldForId(int fieldId)Get the F instance that corresponds to fieldId.java.lang.ObjectgetFieldValue(F field)Get a field's value by field variable.booleanisSet(F field)Check if a field is currently set or unset.voidread(TProtocol iprot)Reads the TObject from the given input protocol.voidsetFieldValue(F field, java.lang.Object value)Set a field's value by field variable.voidwrite(TProtocol oprot)Writes the objects out to the protocol
-
-
-
Method Detail
-
read
void read(TProtocol iprot) throws TException
Reads the TObject from the given input protocol.- Parameters:
iprot- Input protocol- Throws:
TException
-
write
void write(TProtocol oprot) throws TException
Writes the objects out to the protocol- Parameters:
oprot- Output protocol- Throws:
TException
-
fieldForId
F fieldForId(int fieldId)
Get the F instance that corresponds to fieldId.
-
isSet
boolean isSet(F field)
Check if a field is currently set or unset.- Parameters:
field-
-
getFieldValue
java.lang.Object getFieldValue(F field)
Get a field's value by field variable. Primitive types will be wrapped in the appropriate "boxed" types.- Parameters:
field-
-
setFieldValue
void setFieldValue(F field, java.lang.Object value)
Set a field's value by field variable. Primitive types must be "boxed" in the appropriate object wrapper type.- Parameters:
field-
-
clear
void clear()
Return to the state of having just been initialized, as though you had just called the default constructor.
-
-