Interface TBase<T extends TBase<T,F>,F extends TFieldIdEnum>

All Superinterfaces:
Comparable<T>, Serializable, TSerializable
All Known Implementing Classes:
TUnion

public interface TBase<T extends TBase<T,F>,F extends TFieldIdEnum> extends Comparable<T>, TSerializable, Serializable
Generic base interface for generated Thrift objects.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Return to the state of having just been initialized, as though you had just called the default constructor.
    Performs a deep copy of this instance and returns the copy.
    fieldForId(int fieldId)
    Get the F instance that corresponds to fieldId.
    Get a field's value by field variable.
    boolean
    isSet(F field)
    Check if a field is currently set or unset.
    void
    setFieldValue(F field, Object value)
    Set a field's value by field variable.

    Methods inherited from interface java.lang.Comparable

    compareTo

    Methods inherited from interface org.apache.thrift.TSerializable

    read, write
  • Method Details

    • fieldForId

      F fieldForId(int fieldId)
      Get the F instance that corresponds to fieldId.
      Parameters:
      fieldId - the ID of the requested field.
      Returns:
      F instance that corresponds to fieldId.
    • isSet

      boolean isSet(F field)
      Check if a field is currently set or unset.
      Parameters:
      field - the field to check.
      Returns:
      true if the field is set, false otherwise.
    • getFieldValue

      Object getFieldValue(F field)
      Get a field's value by field variable. Primitive types will be wrapped in the appropriate "boxed" types.
      Parameters:
      field - the field whose value is requested.
      Returns:
      the value of the requested field.
    • setFieldValue

      void setFieldValue(F field, Object value)
      Set a field's value by field variable. Primitive types must be "boxed" in the appropriate object wrapper type.
      Parameters:
      field - the field whose value is to be set.
      value - the value to be assigned to field.
    • deepCopy

      T deepCopy()
      Performs a deep copy of this instance and returns the copy.
      Returns:
      a deep copy of this instance.
    • clear

      void clear()
      Return to the state of having just been initialized, as though you had just called the default constructor.