Package org.apache.hadoop.io
Class BooleanWritable
java.lang.Object
org.apache.hadoop.io.BooleanWritable
- All Implemented Interfaces:
Comparable<BooleanWritable>,Writable,WritableComparable<BooleanWritable>
@Public
@Stable
public class BooleanWritable
extends Object
implements WritableComparable<BooleanWritable>
A WritableComparable for booleans.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classorg.apache.hadoop.io.BooleanWritable.ComparatorA Comparator optimized for BooleanWritable. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintbooleanbooleanget()Returns the value of the BooleanWritable.inthashCode()voidreadFields(DataInput in) Deserialize the fields of this object fromin.voidset(boolean value) Set the value of the BooleanWritable.toString()voidwrite(DataOutput out) Serialize the fields of this object toout.
-
Constructor Details
-
BooleanWritable
public BooleanWritable() -
BooleanWritable
public BooleanWritable(boolean value) - Parameters:
value- value.
-
-
Method Details
-
set
public void set(boolean value) Set the value of the BooleanWritable.- Parameters:
value- value.
-
get
public boolean get()Returns the value of the BooleanWritable.- Returns:
- the value of the BooleanWritable.
-
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.
-
equals
-
hashCode
public int hashCode() -
compareTo
- Specified by:
compareToin interfaceComparable<BooleanWritable>
-
toString
-