Package org.apache.hadoop.io
Class VLongWritable
java.lang.Object
org.apache.hadoop.io.VLongWritable
- All Implemented Interfaces:
Comparable<VLongWritable>,Writable,WritableComparable<VLongWritable>
@Public
@Stable
public class VLongWritable
extends Object
implements WritableComparable<VLongWritable>
A WritableComparable for longs in a variable-length format. Such values take
between one and five bytes. Smaller values take fewer bytes.
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintCompares two VLongWritables.booleanReturns true iffois a VLongWritable with the same value.longget()inthashCode()voidreadFields(DataInput in) Deserialize the fields of this object fromin.voidset(long value) Set the value of this LongWritable.toString()voidwrite(DataOutput out) Serialize the fields of this object toout.
-
Constructor Details
-
VLongWritable
public VLongWritable() -
VLongWritable
public VLongWritable(long value)
-
-
Method Details
-
set
public void set(long value) Set the value of this LongWritable.- Parameters:
value- input value.
-
get
public long get()- Returns:
- Return the value of this LongWritable.
-
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
Returns true iffois a VLongWritable with the same value. -
hashCode
public int hashCode() -
compareTo
Compares two VLongWritables.- Specified by:
compareToin interfaceComparable<VLongWritable>
-
toString
-