public class DefaultTuple extends AbstractTuple
Modifier and Type | Class and Description |
---|---|
static class |
DefaultTuple.DefaultTupleRawComparator |
Constructor and Description |
---|
DefaultTuple()
Default constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
append(Object val)
Append a field to a tuple.
|
int |
compareTo(Object other) |
Object |
get(int fieldNum)
Get the value in a given field.
|
List<Object> |
getAll()
Get all of the fields in the tuple as a list.
|
static Class<? extends TupleRawComparator> |
getComparatorClass() |
long |
getMemorySize()
Determine the size of tuple in memory.
|
int |
hashCode() |
void |
readFields(DataInput in) |
void |
set(int fieldNum,
Object val)
Set the value in a given field.
|
int |
size()
Find the size of the tuple.
|
void |
write(DataOutput out) |
equals, getType, isNull, iterator, reference, toDelimitedString, toString
public DefaultTuple()
public int size()
public Object get(int fieldNum) throws ExecException
fieldNum
- Number of the field to get the value for.ExecException
- if the field number is greater than or equal to the number of fields in the tuple.public List<Object> getAll()
public void set(int fieldNum, Object val) throws ExecException
fieldNum
- Number of the field to set the value for.val
- Object to put in the indicated field.ExecException
- if the field number is greater than or equal to the number of fields in the tuple.public void append(Object val)
val
- Object to append to the tuple.public long getMemorySize()
public int compareTo(Object other)
public void write(DataOutput out) throws IOException
IOException
public void readFields(DataInput in) throws IOException
IOException
public static Class<? extends TupleRawComparator> getComparatorClass()
Copyright © 2007-2012 The Apache Software Foundation