public class TridentTupleView extends AbstractList<Object> implements TridentTuple
Extends AbstractList so that it can be emitted directly as Storm tuples.
| Modifier and Type | Class and Description |
|---|---|
static class |
TridentTupleView.FreshOutputFactory |
static class |
TridentTupleView.OperationOutputFactory |
static class |
TridentTupleView.ProjectionFactory |
static class |
TridentTupleView.RootFactory |
TridentTuple.Factory| Modifier and Type | Field and Description |
|---|---|
static TridentTupleView |
EMPTY_TUPLE |
modCount| Constructor and Description |
|---|
TridentTupleView(List delegates,
ValuePointer[] index,
Map<String,ValuePointer> fieldIndex) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
contains(String field)
Returns true if this tuple contains the specified name of the field.
|
static TridentTuple |
createFreshTuple(Fields fields,
List<Object> values) |
static TridentTuple |
createFreshTuple(Fields fields,
Object... values) |
int |
fieldIndex(String field)
Returns the position of the specified field in this tuple.
|
Object |
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.
|
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.
|
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.
|
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.
|
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 |
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.
|
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.
|
add, add, addAll, clear, equals, hashCode, indexOf, iterator, lastIndexOf, listIterator, listIterator, remove, removeRange, set, subListaddAll, contains, containsAll, isEmpty, remove, removeAll, retainAll, toArray, toArray, toStringclone, finalize, getClass, notify, notifyAll, wait, wait, waitadd, add, addAll, addAll, clear, contains, containsAll, equals, hashCode, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, replaceAll, retainAll, set, sort, spliterator, subList, toArray, toArrayparallelStream, removeIf, streampublic static final TridentTupleView EMPTY_TUPLE
public TridentTupleView(List delegates, ValuePointer[] index, Map<String,ValuePointer> fieldIndex)
public static TridentTuple createFreshTuple(Fields fields, List<Object> values)
public static TridentTuple createFreshTuple(Fields fields, Object... values)
public List<Object> getValues()
ITupleGets all the values in this tuple.
public int size()
ITupleReturns the number of fields in this tuple.
public boolean contains(String field)
ITupleReturns true if this tuple contains the specified name of the field.
public Fields getFields()
ITupleGets the names of the fields in this tuple.
public int fieldIndex(String field)
ITupleReturns the position of the specified field in this tuple.
fieldIndex in interface ITuplepublic List<Object> select(Fields selector)
ITupleReturns a subset of the tuple based on the fields selector.
public Object get(int i)
public Object getValue(int i)
ITupleGets the field at position i in the tuple. Returns object since tuples are dynamically typed.
public String getString(int i)
ITupleReturns the String at position i in the tuple.
public Integer getInteger(int i)
ITupleReturns the Integer at position i in the tuple.
getInteger in interface ITuplepublic Long getLong(int i)
ITupleReturns the Long at position i in the tuple.
public Boolean getBoolean(int i)
ITupleReturns the Boolean at position i in the tuple.
getBoolean in interface ITuplepublic Short getShort(int i)
ITupleReturns the Short at position i in the tuple.
public Byte getByte(int i)
ITupleReturns the Byte at position i in the tuple.
public Double getDouble(int i)
ITupleReturns the Double at position i in the tuple.
public Float getFloat(int i)
ITupleReturns the Float at position i in the tuple.
public byte[] getBinary(int i)
ITupleReturns the byte array at position i in the tuple.
public Object getValueByField(String field)
ITupleGets the field with a specific name. Returns object since tuples are dynamically typed.
getValueByField in interface ITuplepublic String getStringByField(String field)
ITupleGets the String field with a specific name.
getStringByField in interface ITuplepublic Integer getIntegerByField(String field)
ITupleGets the Integer field with a specific name.
getIntegerByField in interface ITuplepublic Long getLongByField(String field)
ITupleGets the Long field with a specific name.
getLongByField in interface ITuplepublic Boolean getBooleanByField(String field)
ITupleGets the Boolean field with a specific name.
getBooleanByField in interface ITuplepublic Short getShortByField(String field)
ITupleGets the Short field with a specific name.
getShortByField in interface ITuplepublic Byte getByteByField(String field)
ITupleGets the Byte field with a specific name.
getByteByField in interface ITuplepublic Double getDoubleByField(String field)
ITupleGets the Double field with a specific name.
getDoubleByField in interface ITuplepublic Float getFloatByField(String field)
ITupleGets the Float field with a specific name.
getFloatByField in interface ITuplepublic byte[] getBinaryByField(String field)
ITupleGets the Byte array field with a specific name.
getBinaryByField in interface ITupleCopyright © 2021 The Apache Software Foundation. All rights reserved.