backtype.storm.tuple
Interface ITuple

All Known Subinterfaces:
TridentTuple, Tuple
All Known Implementing Classes:
TridentTupleView, TupleImpl

public interface ITuple


Method Summary
 boolean contains(String field)
          Returns true if this tuple contains the specified name of the field.
 int fieldIndex(String field)
          Returns the position of the specified field in this tuple.
 byte[] getBinary(int i)
          Returns the byte array at position i in the tuple.
 byte[] getBinaryByField(String field)
           
 Boolean getBoolean(int i)
          Returns the Boolean at position i in the tuple.
 Boolean getBooleanByField(String field)
           
 Byte getByte(int i)
          Returns the Byte at position i in the tuple.
 Byte getByteByField(String field)
           
 Double getDouble(int i)
          Returns the Double at position i in the tuple.
 Double getDoubleByField(String field)
           
 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)
           
 Integer getInteger(int i)
          Returns the Integer at position i in the tuple.
 Integer getIntegerByField(String field)
           
 Long getLong(int i)
          Returns the Long at position i in the tuple.
 Long getLongByField(String field)
           
 Short getShort(int i)
          Returns the Short at position i in the tuple.
 Short getShortByField(String field)
           
 String getString(int i)
          Returns the String at position i in the tuple.
 String getStringByField(String field)
           
 Object getValue(int i)
          Gets the field at position i in the tuple.
 Object getValueByField(String field)
           
 List<Object> getValues()
          Gets all the values in this tuple.
 List<Object> select(Fields selector)
          Returns a subset of the tuple based on the fields selector.
 int size()
          Returns the number of fields in this tuple.
 

Method Detail

size

int size()
Returns the number of fields in this tuple.


contains

boolean contains(String field)
Returns true if this tuple contains the specified name of the field.


getFields

Fields getFields()
Gets the names of the fields in this tuple.


fieldIndex

int fieldIndex(String field)
Returns the position of the specified field in this tuple.


select

List<Object> select(Fields selector)
Returns a subset of the tuple based on the fields selector.


getValue

Object getValue(int i)
Gets the field at position i in the tuple. Returns object since tuples are dynamically typed.


getString

String getString(int i)
Returns the String at position i in the tuple. If that field is not a String, you will get a runtime error.


getInteger

Integer getInteger(int i)
Returns the Integer at position i in the tuple. If that field is not an Integer, you will get a runtime error.


getLong

Long getLong(int i)
Returns the Long at position i in the tuple. If that field is not a Long, you will get a runtime error.


getBoolean

Boolean getBoolean(int i)
Returns the Boolean at position i in the tuple. If that field is not a Boolean, you will get a runtime error.


getShort

Short getShort(int i)
Returns the Short at position i in the tuple. If that field is not a Short, you will get a runtime error.


getByte

Byte getByte(int i)
Returns the Byte at position i in the tuple. If that field is not a Byte, you will get a runtime error.


getDouble

Double getDouble(int i)
Returns the Double at position i in the tuple. If that field is not a Double, you will get a runtime error.


getFloat

Float getFloat(int i)
Returns the Float at position i in the tuple. If that field is not a Float, you will get a runtime error.


getBinary

byte[] getBinary(int i)
Returns the byte array at position i in the tuple. If that field is not a byte array, you will get a runtime error.


getValueByField

Object getValueByField(String field)

getStringByField

String getStringByField(String field)

getIntegerByField

Integer getIntegerByField(String field)

getLongByField

Long getLongByField(String field)

getBooleanByField

Boolean getBooleanByField(String field)

getShortByField

Short getShortByField(String field)

getByteByField

Byte getByteByField(String field)

getDoubleByField

Double getDoubleByField(String field)

getFloatByField

Float getFloatByField(String field)

getBinaryByField

byte[] getBinaryByField(String field)

getValues

List<Object> getValues()
Gets all the values in this tuple.



Copyright © 2014 The Apache Software Foundation. All Rights Reserved.