Package org.apache.storm.tuple
Interface ITuple
- All Known Subinterfaces:
- TridentTuple,- Tuple
- All Known Implementing Classes:
- ClojureTuple,- TridentTupleView,- TupleImpl
public interface ITuple
- 
Method SummaryModifier and TypeMethodDescriptionbooleanReturns true if this tuple contains the specified name of the field.intfieldIndex(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) Gets the Byte array field with a specific name.getBoolean(int i) Returns the Boolean at position i in the tuple.getBooleanByField(String field) Gets the Boolean field with a specific name.getByte(int i) Returns the Byte at position i in the tuple.getByteByField(String field) Gets the Byte field with a specific name.getDouble(int i) Returns the Double at position i in the tuple.getDoubleByField(String field) Gets the Double field with a specific name.Gets the names of the fields in this tuple.getFloat(int i) Returns the Float at position i in the tuple.getFloatByField(String field) Gets the Float field with a specific name.getInteger(int i) Returns the Integer at position i in the tuple.getIntegerByField(String field) Gets the Integer field with a specific name.getLong(int i) Returns the Long at position i in the tuple.getLongByField(String field) Gets the Long field with a specific name.getShort(int i) Returns the Short at position i in the tuple.getShortByField(String field) Gets the Short field with a specific name.getString(int i) Returns the String at position i in the tuple.getStringByField(String field) Gets the String field with a specific name.getValue(int i) Gets the field at position i in the tuple.getValueByField(String field) Gets the field with a specific name.Gets all the values in this tuple.Returns a subset of the tuple based on the fields selector.intsize()Returns the number of fields in this tuple.
- 
Method Details- 
sizeint size()Returns the number of fields in this tuple.
- 
containsReturns true if this tuple contains the specified name of the field.
- 
getFieldsFields getFields()Gets the names of the fields in this tuple.
- 
fieldIndexReturns the position of the specified field in this tuple.- Throws:
- IllegalArgumentException- - if field does not exist
 
- 
selectReturns a subset of the tuple based on the fields selector.
- 
getValueGets the field at position i in the tuple. Returns object since tuples are dynamically typed.- Throws:
- IndexOutOfBoundsException- - if the index is out of range `(index < 0 || index >= size())`
 
- 
getStringReturns the String at position i in the tuple.- Throws:
- ClassCastException- If that field is not a String
- IndexOutOfBoundsException- - if the index is out of range `(index < 0 || index >= size())`
 
- 
getIntegerReturns the Integer at position i in the tuple.- Throws:
- ClassCastException- If that field is not a Integer
- IndexOutOfBoundsException- - if the index is out of range `(index < 0 || index >= size())`
 
- 
getLongReturns the Long at position i in the tuple.- Throws:
- ClassCastException- If that field is not a Long
- IndexOutOfBoundsException- - if the index is out of range `(index < 0 || index >= size())`
 
- 
getBooleanReturns the Boolean at position i in the tuple.- Throws:
- ClassCastException- If that field is not a Boolean
- IndexOutOfBoundsException- - if the index is out of range `(index < 0 || index >= size())`
 
- 
getShortReturns the Short at position i in the tuple.- Throws:
- ClassCastException- If that field is not a Short
- IndexOutOfBoundsException- - if the index is out of range `(index < 0 || index >= size())`
 
- 
getByteReturns the Byte at position i in the tuple.- Throws:
- ClassCastException- If that field is not a Byte
- IndexOutOfBoundsException- - if the index is out of range `(index < 0 || index >= size())`
 
- 
getDoubleReturns the Double at position i in the tuple.- Throws:
- ClassCastException- If that field is not a Double
- IndexOutOfBoundsException- - if the index is out of range `(index < 0 || index >= size())`
 
- 
getFloatReturns the Float at position i in the tuple.- Throws:
- ClassCastException- If that field is not a Float
- IndexOutOfBoundsException- - if the index is out of range `(index < 0 || index >= size())`
 
- 
getBinarybyte[] getBinary(int i) Returns the byte array at position i in the tuple.- Throws:
- ClassCastException- If that field is not a byte array
- IndexOutOfBoundsException- - if the index is out of range `(index < 0 || index >= size())`
 
- 
getValueByFieldGets the field with a specific name. Returns object since tuples are dynamically typed.- Throws:
- IllegalArgumentException- - if field does not exist
 
- 
getStringByFieldGets the String field with a specific name.- Throws:
- ClassCastException- If that field is not a String
- IllegalArgumentException- - if field does not exist
 
- 
getIntegerByFieldGets the Integer field with a specific name.- Throws:
- ClassCastException- If that field is not an Integer
- IllegalArgumentException- - if field does not exist
 
- 
getLongByFieldGets the Long field with a specific name.- Throws:
- ClassCastException- If that field is not a Long
- IllegalArgumentException- - if field does not exist
 
- 
getBooleanByFieldGets the Boolean field with a specific name.- Throws:
- ClassCastException- If that field is not a Boolean
- IllegalArgumentException- - if field does not exist
 
- 
getShortByFieldGets the Short field with a specific name.- Throws:
- ClassCastException- If that field is not a Short
- IllegalArgumentException- - if field does not exist
 
- 
getByteByFieldGets the Byte field with a specific name.- Throws:
- ClassCastException- If that field is not a Byte
- IllegalArgumentException- - if field does not exist
 
- 
getDoubleByFieldGets the Double field with a specific name.- Throws:
- ClassCastException- If that field is not a Double
- IllegalArgumentException- - if field does not exist
 
- 
getFloatByFieldGets the Float field with a specific name.- Throws:
- ClassCastException- If that field is not a Float
- IllegalArgumentException- - if field does not exist
 
- 
getBinaryByFieldGets the Byte array field with a specific name.- Throws:
- ClassCastException- If that field is not a byte array
- IllegalArgumentException- - if field does not exist
 
- 
getValuesGets all the values in this tuple.
 
-