org.apache.pig.backend.hadoop
Class DoubleWritable

java.lang.Object
  extended by org.apache.pig.backend.hadoop.DoubleWritable
All Implemented Interfaces:
Comparable, org.apache.hadoop.io.Writable, org.apache.hadoop.io.WritableComparable

public class DoubleWritable
extends Object
implements org.apache.hadoop.io.WritableComparable

Writable for Double values.


Nested Class Summary
static class DoubleWritable.Comparator
          A Comparator optimized for DoubleWritable.
 
Constructor Summary
DoubleWritable()
           
DoubleWritable(double value)
           
 
Method Summary
 int compareTo(Object o)
           
 boolean equals(Object o)
          Returns true iff o is a DoubleWritable with the same value.
 double get()
           
 int hashCode()
           
 void readFields(DataInput in)
           
 void set(double value)
           
 String toString()
           
 void write(DataOutput out)
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DoubleWritable

public DoubleWritable()

DoubleWritable

public DoubleWritable(double value)
Method Detail

readFields

public void readFields(DataInput in)
                throws IOException
Specified by:
readFields in interface org.apache.hadoop.io.Writable
Throws:
IOException

write

public void write(DataOutput out)
           throws IOException
Specified by:
write in interface org.apache.hadoop.io.Writable
Throws:
IOException

set

public void set(double value)

get

public double get()

equals

public boolean equals(Object o)
Returns true iff o is a DoubleWritable with the same value.

Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object

compareTo

public int compareTo(Object o)
Specified by:
compareTo in interface Comparable

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2007-2012 The Apache Software Foundation