Package org.apache.hadoop.io
Class DoubleWritable
java.lang.Object
org.apache.hadoop.io.DoubleWritable
- All Implemented Interfaces:
Comparable<DoubleWritable>,Writable,WritableComparable<DoubleWritable>
@Public
@Stable
public class DoubleWritable
extends Object
implements WritableComparable<DoubleWritable>
Writable for Double values.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classorg.apache.hadoop.io.DoubleWritable.ComparatorA Comparator optimized for DoubleWritable. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintbooleanReturns true iffois a DoubleWritable with the same value.doubleget()inthashCode()voidreadFields(DataInput in) Deserialize the fields of this object fromin.voidset(double value) toString()voidwrite(DataOutput out) Serialize the fields of this object toout.
-
Constructor Details
-
DoubleWritable
public DoubleWritable() -
DoubleWritable
public DoubleWritable(double value)
-
-
Method Details
-
readFields
Description copied from interface:WritableDeserialize the fields of this object fromin.For efficiency, implementations should attempt to re-use storage in the existing object where possible.
- Specified by:
readFieldsin interfaceWritable- Parameters:
in-DataInputto deseriablize this object from.- Throws:
IOException- any other problem for readFields.
-
write
Description copied from interface:WritableSerialize the fields of this object toout.- Specified by:
writein interfaceWritable- Parameters:
out-DataOuputto serialize this object into.- Throws:
IOException- any other problem for write.
-
set
public void set(double value) -
get
public double get() -
equals
Returns true iffois a DoubleWritable with the same value. -
hashCode
public int hashCode() -
compareTo
- Specified by:
compareToin interfaceComparable<DoubleWritable>
-
toString
-