public interface ITuple
Modifier and Type | Method and Description |
---|---|
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)
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.
|
int size()
Returns the number of fields in this tuple.
boolean contains(String field)
Returns true if this tuple contains the specified name of the field.
Fields getFields()
Gets the names of the fields in this tuple.
int fieldIndex(String field)
Returns the position of the specified field in this tuple.
IllegalArgumentException
- List<Object> select(Fields selector)
Returns a subset of the tuple based on the fields selector.
Object getValue(int i)
Gets the field at position i in the tuple. Returns object since tuples are dynamically typed.
IndexOutOfBoundsException
- (index < 0 || index >= size())
String getString(int i)
Returns the String at position i in the tuple.
ClassCastException
- If that field is not a StringIndexOutOfBoundsException
- (index < 0 || index >= size())
Integer getInteger(int i)
Returns the Integer at position i in the tuple.
ClassCastException
- If that field is not a IntegerIndexOutOfBoundsException
- (index < 0 || index >= size())
Long getLong(int i)
Returns the Long at position i in the tuple.
ClassCastException
- If that field is not a LongIndexOutOfBoundsException
- (index < 0 || index >= size())
Boolean getBoolean(int i)
Returns the Boolean at position i in the tuple.
ClassCastException
- If that field is not a BooleanIndexOutOfBoundsException
- (index < 0 || index >= size())
Short getShort(int i)
Returns the Short at position i in the tuple.
ClassCastException
- If that field is not a ShortIndexOutOfBoundsException
- (index < 0 || index >= size())
Byte getByte(int i)
Returns the Byte at position i in the tuple.
ClassCastException
- If that field is not a ByteIndexOutOfBoundsException
- (index < 0 || index >= size())
Double getDouble(int i)
Returns the Double at position i in the tuple.
ClassCastException
- If that field is not a DoubleIndexOutOfBoundsException
- (index < 0 || index >= size())
Float getFloat(int i)
Returns the Float at position i in the tuple.
ClassCastException
- If that field is not a FloatIndexOutOfBoundsException
- (index < 0 || index >= size())
byte[] getBinary(int i)
Returns the byte array at position i in the tuple.
ClassCastException
- If that field is not a byte arrayIndexOutOfBoundsException
- (index < 0 || index >= size())
Object getValueByField(String field)
Gets the field with a specific name. Returns object since tuples are dynamically typed.
IllegalArgumentException
- String getStringByField(String field)
Gets the String field with a specific name.
ClassCastException
- If that field is not a StringIllegalArgumentException
- Integer getIntegerByField(String field)
Gets the Integer field with a specific name.
ClassCastException
- If that field is not an IntegerIllegalArgumentException
- Long getLongByField(String field)
Gets the Long field with a specific name.
ClassCastException
- If that field is not a LongIllegalArgumentException
- Boolean getBooleanByField(String field)
Gets the Boolean field with a specific name.
ClassCastException
- If that field is not a BooleanIllegalArgumentException
- Short getShortByField(String field)
Gets the Short field with a specific name.
ClassCastException
- If that field is not a ShortIllegalArgumentException
- Byte getByteByField(String field)
Gets the Byte field with a specific name.
ClassCastException
- If that field is not a ByteIllegalArgumentException
- Double getDoubleByField(String field)
Gets the Double field with a specific name.
ClassCastException
- If that field is not a DoubleIllegalArgumentException
- Float getFloatByField(String field)
Gets the Float field with a specific name.
ClassCastException
- If that field is not a FloatIllegalArgumentException
- byte[] getBinaryByField(String field)
Gets the Byte array field with a specific name.
ClassCastException
- If that field is not a byte arrayIllegalArgumentException
- Copyright © 2022 The Apache Software Foundation. All rights reserved.