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>fieldId - the field whose value is requested.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 protocolTException - if there is an error reading from iprotpublic void setFieldValue(F fieldId, java.lang.Object value)
TBasesetFieldValue in interface TBase<T extends TUnion<T,F>,F extends TFieldIdEnum>fieldId - the field whose value is to be set.value - the value to be assigned to field.public void setFieldValue(int fieldId,
java.lang.Object value)
public void write(TProtocol oprot) throws TException
TSerializablewrite in interface TSerializableoprot - Output protocolTException - if there is an error writing to oprotprotected abstract void checkType(F setField, java.lang.Object value) throws java.lang.ClassCastException
setField - the field to assign value to.value - the value to be assigned to setField.java.lang.ClassCastException - if the type of value is incompatible with the type of setField.protected abstract java.lang.Object standardSchemeReadValue(TProtocol iprot, TField field) throws TException
iprot - input protocol from which to read a value.field - the field whose value is to be read from iprot.TException - on error during read.protected 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