com.evernote.thrift
Class TUnion<T extends TUnion,F extends TFieldIdEnum>

java.lang.Object
  extended by com.evernote.thrift.TUnion<T,F>
All Implemented Interfaces:
TBase<T>, TReflectionBase<T,F>, Serializable, Comparable<T>

public abstract class TUnion<T extends TUnion,F extends TFieldIdEnum>
extends Object
implements TReflectionBase<T,F>

See Also:
Serialized Form

Method Summary
 void clear()
          Return to the state of having just been initialized, as though you had just called the default constructor.
 Object getFieldValue()
           
 Object getFieldValue(F fieldId)
          Get a field's value by field variable.
 Object getFieldValue(int fieldId)
           
 F getSetField()
           
 boolean isSet()
           
 boolean isSet(F fieldId)
          Check if a field is currently set or unset.
 boolean isSet(int fieldId)
           
 void read(TProtocol iprot)
          Reads an instance of the object from the given protocol.
 void setFieldValue(F fieldId, Object value)
          Set a field's value by field variable.
 void setFieldValue(int fieldId, Object value)
           
 String toString()
           
 void write(TProtocol oprot)
          Writes the object to the given protocol.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface com.evernote.thrift.TReflectionBase
fieldForId
 
Methods inherited from interface com.evernote.thrift.TBase
deepCopy
 
Methods inherited from interface java.lang.Comparable
compareTo
 

Method Detail

getSetField

public F getSetField()

getFieldValue

public Object getFieldValue()

getFieldValue

public Object getFieldValue(F fieldId)
Description copied from interface: TReflectionBase
Get a field's value by field variable. Primitive types will be wrapped in the appropriate "boxed" types.

Specified by:
getFieldValue in interface TReflectionBase<T extends TUnion,F extends TFieldIdEnum>

getFieldValue

public Object getFieldValue(int fieldId)

isSet

public boolean isSet()

isSet

public boolean isSet(F fieldId)
Description copied from interface: TReflectionBase
Check if a field is currently set or unset.

Specified by:
isSet in interface TReflectionBase<T extends TUnion,F extends TFieldIdEnum>

isSet

public boolean isSet(int fieldId)

read

public void read(TProtocol iprot)
          throws TException
Description copied from interface: TBase
Reads an instance of the object from the given protocol.

Specified by:
read in interface TBase<T extends TUnion>
Parameters:
iprot - Input protocol
Throws:
TException

setFieldValue

public void setFieldValue(F fieldId,
                          Object value)
Description copied from interface: TReflectionBase
Set a field's value by field variable. Primitive types must be "boxed" in the appropriate object wrapper type.

Specified by:
setFieldValue in interface TReflectionBase<T extends TUnion,F extends TFieldIdEnum>

setFieldValue

public void setFieldValue(int fieldId,
                          Object value)

write

public void write(TProtocol oprot)
           throws TException
Description copied from interface: TBase
Writes the object to the given protocol.

Specified by:
write in interface TBase<T extends TUnion>
Parameters:
oprot - Output protocol
Throws:
TException

toString

public String toString()
Overrides:
toString in class Object

clear

public final void clear()
Description copied from interface: TBase
Return to the state of having just been initialized, as though you had just called the default constructor.

Specified by:
clear in interface TBase<T extends TUnion>


Copyright © 2013. All Rights Reserved.