public class SimpleTuple extends Object implements ITuple, Serializable
Constructor and Description |
---|
SimpleTuple(Fields keyFields,
List<Object>... values) |
SimpleTuple(Fields keyFields,
List<Object> values) |
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.
|
List<String> |
getKeys() |
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.
|
SimpleTuple |
put(String key,
Object value) |
List<Object> |
select(Fields selector)
Returns a subset of the tuple based on the fields selector.
|
SimpleTuple |
setValues(List<Object> values) |
int |
size()
Returns the number of fields in this tuple.
|
public SimpleTuple put(String key, Object value)
public int size()
ITuple
public boolean contains(String field)
ITuple
public Fields getFields()
ITuple
public int fieldIndex(String field)
ITuple
fieldIndex
in interface ITuple
public List<Object> select(Fields selector)
ITuple
public Object getValue(int i)
ITuple
public String getString(int i)
ITuple
public Integer getInteger(int i)
ITuple
getInteger
in interface ITuple
public Long getLong(int i)
ITuple
public Boolean getBoolean(int i)
ITuple
getBoolean
in interface ITuple
public Short getShort(int i)
ITuple
public Byte getByte(int i)
ITuple
public Double getDouble(int i)
ITuple
public Float getFloat(int i)
ITuple
public byte[] getBinary(int i)
ITuple
public Object getValueByField(String field)
ITuple
getValueByField
in interface ITuple
public String getStringByField(String field)
ITuple
getStringByField
in interface ITuple
public Integer getIntegerByField(String field)
ITuple
getIntegerByField
in interface ITuple
public Long getLongByField(String field)
ITuple
getLongByField
in interface ITuple
public Boolean getBooleanByField(String field)
ITuple
getBooleanByField
in interface ITuple
public Short getShortByField(String field)
ITuple
getShortByField
in interface ITuple
public Byte getByteByField(String field)
ITuple
getByteByField
in interface ITuple
public Double getDoubleByField(String field)
ITuple
getDoubleByField
in interface ITuple
public Float getFloatByField(String field)
ITuple
getFloatByField
in interface ITuple
public byte[] getBinaryByField(String field)
ITuple
getBinaryByField
in interface ITuple
public List<Object> getValues()
ITuple
public SimpleTuple setValues(List<Object> values)
Copyright © 2023 The Apache Software Foundation. All rights reserved.