|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.thrift.TUnion<T,F>
public abstract class TUnion<T extends TUnion,F extends TFieldIdEnum>
Field Summary | |
---|---|
protected F |
setField_
|
protected java.lang.Object |
value_
|
Constructor Summary | |
---|---|
protected |
TUnion()
|
protected |
TUnion(F setField,
java.lang.Object value)
|
protected |
TUnion(TUnion<T,F> other)
|
Method Summary | |
---|---|
protected abstract void |
checkType(F setField,
java.lang.Object value)
Implementation should be generated so that we can efficiently type check various values. |
protected abstract F |
enumForId(short id)
|
protected abstract TField |
getFieldDesc(F setField)
|
java.lang.Object |
getFieldValue()
|
java.lang.Object |
getFieldValue(F fieldId)
Get a field's value by field variable. |
java.lang.Object |
getFieldValue(int fieldId)
Get a field's value by id. |
F |
getSetField()
|
protected abstract TStruct |
getStructDesc()
|
boolean |
isSet()
|
boolean |
isSet(F fieldId)
Check if a field is currently set or unset. |
boolean |
isSet(int fieldId)
Check if a field is currently set or unset. |
void |
read(TProtocol iprot)
Reads the TObject from the given input protocol. |
protected abstract java.lang.Object |
readValue(TProtocol iprot,
TField field)
Implementation should be generated to read the right stuff from the wire based on the field header. |
void |
setFieldValue(F fieldId,
java.lang.Object value)
Set a field's value by field variable. |
void |
setFieldValue(int fieldId,
java.lang.Object value)
Set a field's value by id. |
java.lang.String |
toString()
|
void |
write(TProtocol oprot)
Writes the objects out to the protocol |
protected abstract void |
writeValue(TProtocol oprot)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface org.apache.thrift.TBase |
---|
deepCopy |
Methods inherited from interface java.lang.Comparable |
---|
compareTo |
Field Detail |
---|
protected java.lang.Object value_
protected F extends TFieldIdEnum setField_
Constructor Detail |
---|
protected TUnion()
protected TUnion(F setField, java.lang.Object value)
protected TUnion(TUnion<T,F> other)
Method Detail |
---|
public F getSetField()
public java.lang.Object getFieldValue()
public java.lang.Object getFieldValue(F fieldId)
TBase
getFieldValue
in interface TBase<T extends TUnion,F extends TFieldIdEnum>
public java.lang.Object getFieldValue(int fieldId)
TBase
getFieldValue
in interface TBase<T extends TUnion,F extends TFieldIdEnum>
fieldId
- The field's id tag as found in the IDL.public boolean isSet()
public boolean isSet(F fieldId)
TBase
isSet
in interface TBase<T extends TUnion,F extends TFieldIdEnum>
public boolean isSet(int fieldId)
TBase
isSet
in interface TBase<T extends TUnion,F extends TFieldIdEnum>
fieldId
- The field's id tag as found in the IDL.public void read(TProtocol iprot) throws TException
TBase
read
in interface TBase<T extends TUnion,F extends TFieldIdEnum>
iprot
- Input protocol
TException
public void setFieldValue(F fieldId, java.lang.Object value)
TBase
setFieldValue
in interface TBase<T extends TUnion,F extends TFieldIdEnum>
public void setFieldValue(int fieldId, java.lang.Object value)
TBase
setFieldValue
in interface TBase<T extends TUnion,F extends TFieldIdEnum>
fieldId
- The field's id tag as found in the IDL.public void write(TProtocol oprot) throws TException
TBase
write
in interface TBase<T extends TUnion,F extends TFieldIdEnum>
oprot
- Output protocol
TException
protected abstract void checkType(F setField, java.lang.Object value) throws java.lang.ClassCastException
setField
- value
-
java.lang.ClassCastException
protected abstract java.lang.Object readValue(TProtocol iprot, TField field) throws TException
field
-
TException
protected abstract void writeValue(TProtocol oprot) throws TException
TException
protected abstract TStruct getStructDesc()
protected abstract TField getFieldDesc(F setField)
protected abstract F enumForId(short id)
public java.lang.String toString()
toString
in class java.lang.Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |