@InterfaceAudience.Public @InterfaceStability.Stable public class ShortWritable extends Object implements WritableComparable<ShortWritable>
Constructor and Description |
---|
ShortWritable() |
ShortWritable(short value) |
Modifier and Type | Method and Description |
---|---|
int |
compareTo(ShortWritable o)
Compares two ShortWritable.
|
boolean |
equals(Object o)
Returns true iff
o is a ShortWritable with the same value. |
short |
get()
Return the value of this ShortWritable.
|
int |
hashCode()
hash code
|
void |
readFields(DataInput in)
read the short value
|
void |
set(short value)
Set the value of this ShortWritable.
|
String |
toString()
Short values in string format
|
void |
write(DataOutput out)
write short value
|
public ShortWritable()
public ShortWritable(short value)
public void set(short value)
public short get()
public void readFields(DataInput in) throws IOException
readFields
in interface Writable
in
- DataInput
to deseriablize this object from.IOException
public void write(DataOutput out) throws IOException
write
in interface Writable
out
- DataOuput
to serialize this object into.IOException
public int compareTo(ShortWritable o)
compareTo
in interface Comparable<ShortWritable>
Copyright © 2016 Apache Software Foundation. All rights reserved.