org.apache.pig.data
Class DataAtom

java.lang.Object
  extended by org.apache.pig.data.Datum
      extended by org.apache.pig.data.DataAtom
All Implemented Interfaces:
Comparable

public final class DataAtom
extends Datum

The basic data unit. We represent all atomic data objects as strings or raw-bytes.


Field Summary
static String EMPTY
           
 
Fields inherited from class org.apache.pig.data.Datum
ATOM, BAG, MAP, OBJECT_SIZE, RECORD_1, RECORD_2, RECORD_3, REF_SIZE, TUPLE
 
Constructor Summary
DataAtom()
           
DataAtom(byte[] valIn)
           
DataAtom(double valIn)
           
DataAtom(int valIn)
           
DataAtom(long valIn)
           
DataAtom(String valIn)
           
 
Method Summary
 int compareTo(Object other)
           
 boolean equals(Object other)
           
 long getMemorySize()
           
 byte[] getValueBytes()
           
 int hashCode()
           
 long longVal()
           
 Double numval()
           
 void setValue(byte[] valIn)
           
 void setValue(double valIn)
           
 void setValue(int valIn)
           
 void setValue(long valIn)
           
 void setValue(String valIn)
           
 String strval()
           
 String toString()
           
 void write(DataOutput out)
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

EMPTY

public static String EMPTY
Constructor Detail

DataAtom

public DataAtom()

DataAtom

public DataAtom(String valIn)

DataAtom

public DataAtom(int valIn)

DataAtom

public DataAtom(long valIn)

DataAtom

public DataAtom(byte[] valIn)

DataAtom

public DataAtom(double valIn)
Method Detail

setValue

public void setValue(String valIn)

setValue

public void setValue(byte[] valIn)

setValue

public void setValue(int valIn)

setValue

public void setValue(long valIn)

setValue

public void setValue(double valIn)

getValueBytes

public byte[] getValueBytes()

strval

public String strval()

numval

public Double numval()

longVal

public long longVal()

toString

public String toString()
Overrides:
toString in class Object

equals

public boolean equals(Object other)
Specified by:
equals in class Datum

compareTo

public int compareTo(Object other)

write

public void write(DataOutput out)
           throws IOException
Specified by:
write in class Datum
Throws:
IOException

hashCode

public int hashCode()
Overrides:
hashCode in class Object

getMemorySize

public long getMemorySize()
Specified by:
getMemorySize in class Datum


Copyright © ${year} The Apache Software Foundation