Package org.apache.storm.tuple

## Class TupleImpl

- java.lang.Object
- - org.apache.storm.tuple.TupleImpl

- All Implemented Interfaces:
    `ITuple`, `Tuple`
  Direct Known Subclasses:
    `ClojureTuple`

      public class TupleImpl
      extends Object
      implements Tuple

- - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `TupleImpl​(GeneralTopologyContext context, List<Object> values, String srcComponent, int taskId, String streamId)` |
    `TupleImpl​(GeneralTopologyContext context, List<Object> values, String srcComponent, int taskId, String streamId, MessageId id)` |
    `TupleImpl​(Tuple t)` |

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `boolean` | `contains​(String field)` | Returns true if this tuple contains the specified name of the field.
    `boolean` | `equals​(Object other)` |
    `int` | `fieldIndex​(String field)` | Returns the position of the specified field in this tuple.
    `long` | `getAckVal()` |
    `byte[]` | `getBinary​(int i)` | Returns the byte array at position i in the tuple.
    `byte[]` | `getBinaryByField​(String field)` | Gets the Byte array field with a specific name.
    `Boolean` | `getBoolean​(int i)` | Returns the Boolean at position i in the tuple.
    `Boolean` | `getBooleanByField​(String field)` | Gets the Boolean field with a specific name.
    `Byte` | `getByte​(int i)` | Returns the Byte at position i in the tuple.
    `Byte` | `getByteByField​(String field)` | Gets the Byte field with a specific name.
    `GeneralTopologyContext` | `getContext()` | Gets the topology context associated with the tuple.
    `Double` | `getDouble​(int i)` | Returns the Double at position i in the tuple.
    `Double` | `getDoubleByField​(String field)` | Gets the Double field with a specific name.
    `Long` | `getExecuteSampleStartTime()` |
    `Fields` | `getFields()` | Gets the names of the fields in this tuple.
    `Float` | `getFloat​(int i)` | Returns the Float at position i in the tuple.
    `Float` | `getFloatByField​(String field)` | Gets the Float field with a specific name.
    `Integer` | `getInteger​(int i)` | Returns the Integer at position i in the tuple.
    `Integer` | `getIntegerByField​(String field)` | Gets the Integer field with a specific name.
    `Long` | `getLong​(int i)` | Returns the Long at position i in the tuple.
    `Long` | `getLongByField​(String field)` | Gets the Long field with a specific name.
    `MessageId` | `getMessageId()` | Gets the message id that associated with this tuple.
    `Long` | `getProcessSampleStartTime()` |
    `Short` | `getShort​(int i)` | Returns the Short at position i in the tuple.
    `Short` | `getShortByField​(String field)` | Gets the Short field with a specific name.
    `String` | `getSourceComponent()` | Gets the id of the component that created this tuple.
    `GlobalStreamId` | `getSourceGlobalStreamId()` | Returns the global stream id (component + stream) of this tuple.
    `String` | `getSourceStreamId()` | Gets the id of the stream that this tuple was emitted to.
    `int` | `getSourceTask()` | Gets the id of the task that created this tuple.
    `String` | `getString​(int i)` | Returns the String at position i in the tuple.
    `String` | `getStringByField​(String field)` | Gets the String field with a specific name.
    `Object` | `getValue​(int i)` | Gets the field at position i in the tuple.
    `Object` | `getValueByField​(String field)` | Gets the field with a specific name.
    `List<Object>` | `getValues()` | Gets all the values in this tuple.
    `int` | `hashCode()` |
    `List<Object>` | `select​(Fields selector)` | Returns a subset of the tuple based on the fields selector.
    `void` | `setExecuteSampleStartTime​(long ms)` |
    `void` | `setProcessSampleStartTime​(long ms)` |
    `int` | `size()` | Returns the number of fields in this tuple.
    `String` | `toString()` |
    `void` | `updateAckVal​(long val)` |

    - ### Methods inherited from class java.lang.Object

      `clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

- - ### Constructor Detail

    - #### TupleImpl

          public TupleImpl​(Tuple t)

    - #### TupleImpl

          public TupleImpl​(GeneralTopologyContext context,
                           List<Object> values,
                           String srcComponent,
                           int taskId,
                           String streamId,
                           MessageId id)

    - #### TupleImpl

          public TupleImpl​(GeneralTopologyContext context,
                           List<Object> values,
                           String srcComponent,
                           int taskId,
                           String streamId)

  - ### Method Detail

    - #### getProcessSampleStartTime

          public Long getProcessSampleStartTime()

    - #### setProcessSampleStartTime

          public void setProcessSampleStartTime​(long ms)

    - #### getExecuteSampleStartTime

          public Long getExecuteSampleStartTime()

    - #### setExecuteSampleStartTime

          public void setExecuteSampleStartTime​(long ms)

    - #### updateAckVal

          public void updateAckVal​(long val)

    - #### getAckVal

          public long getAckVal()

    - #### size

          public int size()

      Description copied from interface: `ITuple`
      Returns the number of fields in this tuple.
      Specified by:
        `size` in interface `ITuple`

    - #### fieldIndex

          public int fieldIndex​(String field)

      Description copied from interface: `ITuple`
      Returns the position of the specified field in this tuple.
      Specified by:
        `fieldIndex` in interface `ITuple`

    - #### contains

          public boolean contains​(String field)

      Description copied from interface: `ITuple`
      Returns true if this tuple contains the specified name of the field.
      Specified by:
        `contains` in interface `ITuple`

    - #### getValue

          public Object getValue​(int i)

      Description copied from interface: `ITuple`
      Gets the field at position i in the tuple. Returns object since tuples are dynamically typed.
      Specified by:
        `getValue` in interface `ITuple`

    - #### getString

          public String getString​(int i)

      Description copied from interface: `ITuple`
      Returns the String at position i in the tuple.
      Specified by:
        `getString` in interface `ITuple`

    - #### getInteger

          public Integer getInteger​(int i)

      Description copied from interface: `ITuple`
      Returns the Integer at position i in the tuple.
      Specified by:
        `getInteger` in interface `ITuple`

    - #### getLong

          public Long getLong​(int i)

      Description copied from interface: `ITuple`
      Returns the Long at position i in the tuple.
      Specified by:
        `getLong` in interface `ITuple`

    - #### getBoolean

          public Boolean getBoolean​(int i)

      Description copied from interface: `ITuple`
      Returns the Boolean at position i in the tuple.
      Specified by:
        `getBoolean` in interface `ITuple`

    - #### getShort

          public Short getShort​(int i)

      Description copied from interface: `ITuple`
      Returns the Short at position i in the tuple.
      Specified by:
        `getShort` in interface `ITuple`

    - #### getByte

          public Byte getByte​(int i)

      Description copied from interface: `ITuple`
      Returns the Byte at position i in the tuple.
      Specified by:
        `getByte` in interface `ITuple`

    - #### getDouble

          public Double getDouble​(int i)

      Description copied from interface: `ITuple`
      Returns the Double at position i in the tuple.
      Specified by:
        `getDouble` in interface `ITuple`

    - #### getFloat

          public Float getFloat​(int i)

      Description copied from interface: `ITuple`
      Returns the Float at position i in the tuple.
      Specified by:
        `getFloat` in interface `ITuple`

    - #### getBinary

          public byte[] getBinary​(int i)

      Description copied from interface: `ITuple`
      Returns the byte array at position i in the tuple.
      Specified by:
        `getBinary` in interface `ITuple`

    - #### getValueByField

          public Object getValueByField​(String field)

      Description copied from interface: `ITuple`
      Gets the field with a specific name. Returns object since tuples are dynamically typed.
      Specified by:
        `getValueByField` in interface `ITuple`

    - #### getStringByField

          public String getStringByField​(String field)

      Description copied from interface: `ITuple`
      Gets the String field with a specific name.
      Specified by:
        `getStringByField` in interface `ITuple`

    - #### getIntegerByField

          public Integer getIntegerByField​(String field)

      Description copied from interface: `ITuple`
      Gets the Integer field with a specific name.
      Specified by:
        `getIntegerByField` in interface `ITuple`

    - #### getLongByField

          public Long getLongByField​(String field)

      Description copied from interface: `ITuple`
      Gets the Long field with a specific name.
      Specified by:
        `getLongByField` in interface `ITuple`

    - #### getBooleanByField

          public Boolean getBooleanByField​(String field)

      Description copied from interface: `ITuple`
      Gets the Boolean field with a specific name.
      Specified by:
        `getBooleanByField` in interface `ITuple`

    - #### getShortByField

          public Short getShortByField​(String field)

      Description copied from interface: `ITuple`
      Gets the Short field with a specific name.
      Specified by:
        `getShortByField` in interface `ITuple`

    - #### getByteByField

          public Byte getByteByField​(String field)

      Description copied from interface: `ITuple`
      Gets the Byte field with a specific name.
      Specified by:
        `getByteByField` in interface `ITuple`

    - #### getDoubleByField

          public Double getDoubleByField​(String field)

      Description copied from interface: `ITuple`
      Gets the Double field with a specific name.
      Specified by:
        `getDoubleByField` in interface `ITuple`

    - #### getFloatByField

          public Float getFloatByField​(String field)

      Description copied from interface: `ITuple`
      Gets the Float field with a specific name.
      Specified by:
        `getFloatByField` in interface `ITuple`

    - #### getBinaryByField

          public byte[] getBinaryByField​(String field)

      Description copied from interface: `ITuple`
      Gets the Byte array field with a specific name.
      Specified by:
        `getBinaryByField` in interface `ITuple`

    - #### getValues

          public List<Object> getValues()

      Description copied from interface: `ITuple`
      Gets all the values in this tuple.
      Specified by:
        `getValues` in interface `ITuple`

    - #### getFields

          public Fields getFields()

      Description copied from interface: `ITuple`
      Gets the names of the fields in this tuple.
      Specified by:
        `getFields` in interface `ITuple`

    - #### select

          public List<Object> select​(Fields selector)

      Description copied from interface: `ITuple`
      Returns a subset of the tuple based on the fields selector.
      Specified by:
        `select` in interface `ITuple`

    - #### getSourceGlobalStreamId

          public GlobalStreamId getSourceGlobalStreamId()

      Description copied from interface: `Tuple`
      Returns the global stream id (component + stream) of this tuple.
      Specified by:
        `getSourceGlobalStreamId` in interface `Tuple`

    - #### getSourceComponent

          public String getSourceComponent()

      Description copied from interface: `Tuple`
      Gets the id of the component that created this tuple.
      Specified by:
        `getSourceComponent` in interface `Tuple`

    - #### getSourceTask

          public int getSourceTask()

      Description copied from interface: `Tuple`
      Gets the id of the task that created this tuple.
      Specified by:
        `getSourceTask` in interface `Tuple`

    - #### getSourceStreamId

          public String getSourceStreamId()

      Description copied from interface: `Tuple`
      Gets the id of the stream that this tuple was emitted to.
      Specified by:
        `getSourceStreamId` in interface `Tuple`

    - #### getMessageId

          public MessageId getMessageId()

      Description copied from interface: `Tuple`
      Gets the message id that associated with this tuple.
      Specified by:
        `getMessageId` in interface `Tuple`

    - #### getContext

          public GeneralTopologyContext getContext()

      Description copied from interface: `Tuple`
      Gets the topology context associated with the tuple.
      Specified by:
        `getContext` in interface `Tuple`

    - #### toString

          public String toString()

      Overrides:
        `toString` in class `Object`

    - #### equals

          public boolean equals​(Object other)

      Overrides:
        `equals` in class `Object`

    - #### hashCode

          public int hashCode()

      Overrides:
        `hashCode` in class `Object`