public abstract class TUnion<T extends TUnion<T,F>,F extends TFieldIdEnum> extends java.lang.Object implements TBase<T,F>
| Modifier and Type | Field and Description |
|---|---|
protected F |
setField_ |
protected java.lang.Object |
value_ |
| Modifier | Constructor and Description |
|---|---|
protected |
TUnion() |
protected |
TUnion(F setField,
java.lang.Object value) |
protected |
TUnion(TUnion<T,F> other) |
| Modifier and Type | Method and Description |
|---|---|
protected abstract void |
checkType(F setField,
java.lang.Object value)
Implementation should be generated so that we can efficiently type check
various values.
|
void |
clear()
Return to the state of having just been initialized, as though you had just
called the default constructor.
|
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) |
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) |
void |
read(TProtocol iprot)
Reads the TObject from the given input protocol.
|
void |
setFieldValue(F fieldId,
java.lang.Object value)
Set a field's value by field variable.
|
void |
setFieldValue(int fieldId,
java.lang.Object value) |
protected abstract java.lang.Object |
standardSchemeReadValue(TProtocol iprot,
TField field)
Implementation should be generated to read the right stuff from the wire
based on the field header.
|
protected abstract void |
standardSchemeWriteValue(TProtocol oprot) |
java.lang.String |
toString() |
protected abstract java.lang.Object |
tupleSchemeReadValue(TProtocol iprot,
short fieldID) |
protected abstract void |
tupleSchemeWriteValue(TProtocol oprot) |
void |
write(TProtocol oprot)
Writes the objects out to the protocol
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitdeepCopy, fieldForIdprotected java.lang.Object value_
protected F extends TFieldIdEnum setField_
protected TUnion()
protected TUnion(F setField, java.lang.Object value)
public F getSetField()
public java.lang.Object getFieldValue()
public java.lang.Object getFieldValue(F fieldId)
TBasegetFieldValue in interface TBase<T extends TUnion<T,F>,F extends TFieldIdEnum>public java.lang.Object getFieldValue(int fieldId)
public boolean isSet()
public boolean isSet(F fieldId)
TBasepublic boolean isSet(int fieldId)
public void read(TProtocol iprot) throws TException
TSerializableread in interface TSerializableiprot - Input protocolTExceptionpublic void setFieldValue(F fieldId, java.lang.Object value)
TBasesetFieldValue in interface TBase<T extends TUnion<T,F>,F extends TFieldIdEnum>public void setFieldValue(int fieldId,
java.lang.Object value)
public void write(TProtocol oprot) throws TException
TSerializablewrite in interface TSerializableoprot - Output protocolTExceptionprotected abstract void checkType(F setField, java.lang.Object value) throws java.lang.ClassCastException
setField - value - java.lang.ClassCastExceptionprotected abstract java.lang.Object standardSchemeReadValue(TProtocol iprot, TField field) throws TException
field - TExceptionprotected abstract void standardSchemeWriteValue(TProtocol oprot) throws TException
TExceptionprotected abstract java.lang.Object tupleSchemeReadValue(TProtocol iprot, short fieldID) throws TException
TExceptionprotected abstract void tupleSchemeWriteValue(TProtocol oprot) throws TException
TExceptionprotected abstract TStruct getStructDesc()
protected abstract F enumForId(short id)
public java.lang.String toString()
toString in class java.lang.Object