Package org.apache.hadoop.io
Class NullWritable
java.lang.Object
org.apache.hadoop.io.NullWritable
- All Implemented Interfaces:
Comparable<NullWritable>,Writable,WritableComparable<NullWritable>
@Public
@Stable
public class NullWritable
extends Object
implements WritableComparable<NullWritable>
Singleton Writable with no data.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classorg.apache.hadoop.io.NullWritable.ComparatorA Comparator "optimized" for NullWritable. -
Method Summary
Modifier and TypeMethodDescriptionintcompareTo(NullWritable other) booleanstatic NullWritableget()Returns the single instance of this class.inthashCode()voidreadFields(DataInput in) Deserialize the fields of this object fromin.toString()voidwrite(DataOutput out) Serialize the fields of this object toout.
-
Method Details
-
get
Returns the single instance of this class.- Returns:
- the single instance of this class.
-
toString
-
hashCode
public int hashCode() -
compareTo
- Specified by:
compareToin interfaceComparable<NullWritable>
-
equals
-
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.
-