@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() |
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)
value
- input value.public short get()
public void readFields(DataInput in) throws IOException
readFields
in interface Writable
in
- DataInput
to deseriablize this object from.IOException
- any other problem for readFields.public void write(DataOutput out) throws IOException
write
in interface Writable
out
- DataOuput
to serialize this object into.IOException
- any other problem for write.public boolean equals(Object o)
o
is a ShortWritable with the same value.public int compareTo(ShortWritable o)
compareTo
in interface Comparable<ShortWritable>
Copyright © 2023 Apache Software Foundation. All rights reserved.