Package org.apache.storm.trident.tuple
Class TridentTupleView
- All Implemented Interfaces:
Iterable<Object>,Collection<Object>,List<Object>,TridentTuple,ITuple
Extends AbstractList so that it can be emitted directly as Storm tuples.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classstatic classstatic classstatic classNested classes/interfaces inherited from interface org.apache.storm.trident.tuple.TridentTuple
TridentTuple.Factory -
Field Summary
FieldsFields inherited from class java.util.AbstractList
modCount -
Constructor Summary
ConstructorsConstructorDescriptionTridentTupleView(List delegates, ValuePointer[] index, Map<String, ValuePointer> fieldIndex) -
Method Summary
Modifier and TypeMethodDescriptionbooleanReturns true if this tuple contains the specified name of the field.static TridentTuplecreateFreshTuple(Fields fields, Object... values) static TridentTuplecreateFreshTuple(Fields fields, List<Object> values) intfieldIndex(String field) Returns the position of the specified field in this tuple.get(int i) 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.Methods inherited from class java.util.AbstractList
add, add, addAll, clear, equals, hashCode, indexOf, iterator, lastIndexOf, listIterator, listIterator, remove, removeRange, set, subListMethods inherited from class java.util.AbstractCollection
addAll, contains, containsAll, isEmpty, remove, removeAll, retainAll, toArray, toArray, toStringMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface java.util.Collection
parallelStream, removeIf, stream, toArrayMethods inherited from interface java.util.List
add, add, addAll, addAll, clear, contains, containsAll, equals, hashCode, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, replaceAll, retainAll, set, sort, spliterator, subList, toArray, toArray
-
Field Details
-
EMPTY_TUPLE
-
-
Constructor Details
-
TridentTupleView
-
-
Method Details
-
createFreshTuple
-
createFreshTuple
-
getValues
Description copied from interface:ITupleGets all the values in this tuple. -
size
public int size()Description copied from interface:ITupleReturns the number of fields in this tuple. -
contains
Description copied from interface:ITupleReturns true if this tuple contains the specified name of the field. -
getFields
Description copied from interface:ITupleGets the names of the fields in this tuple. -
fieldIndex
Description copied from interface:ITupleReturns the position of the specified field in this tuple.- Specified by:
fieldIndexin interfaceITuple
-
select
Description copied from interface:ITupleReturns a subset of the tuple based on the fields selector. -
get
-
getValue
Description copied from interface:ITupleGets the field at position i in the tuple. Returns object since tuples are dynamically typed. -
getString
Description copied from interface:ITupleReturns the String at position i in the tuple. -
getInteger
Description copied from interface:ITupleReturns the Integer at position i in the tuple.- Specified by:
getIntegerin interfaceITuple
-
getLong
Description copied from interface:ITupleReturns the Long at position i in the tuple. -
getBoolean
Description copied from interface:ITupleReturns the Boolean at position i in the tuple.- Specified by:
getBooleanin interfaceITuple
-
getShort
Description copied from interface:ITupleReturns the Short at position i in the tuple. -
getByte
Description copied from interface:ITupleReturns the Byte at position i in the tuple. -
getDouble
Description copied from interface:ITupleReturns the Double at position i in the tuple. -
getFloat
Description copied from interface:ITupleReturns the Float at position i in the tuple. -
getBinary
public byte[] getBinary(int i) Description copied from interface:ITupleReturns the byte array at position i in the tuple. -
getValueByField
Description copied from interface:ITupleGets the field with a specific name. Returns object since tuples are dynamically typed.- Specified by:
getValueByFieldin interfaceITuple
-
getStringByField
Description copied from interface:ITupleGets the String field with a specific name.- Specified by:
getStringByFieldin interfaceITuple
-
getIntegerByField
Description copied from interface:ITupleGets the Integer field with a specific name.- Specified by:
getIntegerByFieldin interfaceITuple
-
getLongByField
Description copied from interface:ITupleGets the Long field with a specific name.- Specified by:
getLongByFieldin interfaceITuple
-
getBooleanByField
Description copied from interface:ITupleGets the Boolean field with a specific name.- Specified by:
getBooleanByFieldin interfaceITuple
-
getShortByField
Description copied from interface:ITupleGets the Short field with a specific name.- Specified by:
getShortByFieldin interfaceITuple
-
getByteByField
Description copied from interface:ITupleGets the Byte field with a specific name.- Specified by:
getByteByFieldin interfaceITuple
-
getDoubleByField
Description copied from interface:ITupleGets the Double field with a specific name.- Specified by:
getDoubleByFieldin interfaceITuple
-
getFloatByField
Description copied from interface:ITupleGets the Float field with a specific name.- Specified by:
getFloatByFieldin interfaceITuple
-
getBinaryByField
Description copied from interface:ITupleGets the Byte array field with a specific name.- Specified by:
getBinaryByFieldin interfaceITuple
-