|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.pig.data.AbstractTuple
org.apache.pig.data.DefaultTuple
public class DefaultTuple
A default implementation of Tuple. This class will be created by the DefaultTupleFactory.
Nested Class Summary | |
---|---|
static class |
DefaultTuple.DefaultTupleRawComparator
|
Field Summary | |
---|---|
protected boolean |
isNull
|
protected List<Object> |
mFields
|
Fields inherited from interface org.apache.pig.data.Tuple |
---|
NOTNULL, NULL |
Constructor Summary | |
---|---|
DefaultTuple()
Default constructor. |
Method Summary | |
---|---|
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)
|
Methods inherited from class org.apache.pig.data.AbstractTuple |
---|
equals, getType, isNull, iterator, reference, toDelimitedString, toString |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected boolean isNull
protected List<Object> mFields
Constructor Detail |
---|
public DefaultTuple()
Method Detail |
---|
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 int hashCode()
hashCode
in class Object
public void write(DataOutput out) throws IOException
IOException
public void readFields(DataInput in) throws IOException
IOException
public static Class<? extends TupleRawComparator> getComparatorClass()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |