java.lang.Comparable<ShortWritable>, Writable, WritableComparable<ShortWritable>@Public @Stable public class ShortWritable extends java.lang.Object implements WritableComparable<ShortWritable>
| Modifier and Type | Class | Description |
|---|---|---|
static class |
ShortWritable.Comparator |
A Comparator optimized for ShortWritable.
|
| Constructor | Description |
|---|---|
ShortWritable() |
|
ShortWritable(short value) |
| Modifier and Type | Method | Description |
|---|---|---|
int |
compareTo(ShortWritable o) |
Compares two ShortWritable.
|
boolean |
equals(java.lang.Object o) |
Returns true iff
o is a ShortWritable with the same value. |
short |
get() |
|
int |
hashCode() |
hash code
|
void |
readFields(java.io.DataInput in) |
read the short value
|
void |
set(short value) |
Set the value of this ShortWritable.
|
java.lang.String |
toString() |
Short values in string format
|
void |
write(java.io.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(java.io.DataInput in)
throws java.io.IOException
readFields in interface Writablein - DataInput to deseriablize this object from.java.io.IOException - any other problem for readFields.public void write(java.io.DataOutput out)
throws java.io.IOException
public boolean equals(java.lang.Object o)
o is a ShortWritable with the same value.equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Objectpublic int compareTo(ShortWritable o)
compareTo in interface java.lang.Comparable<ShortWritable>public java.lang.String toString()
toString in class java.lang.ObjectCopyright © 2008–2025 Apache Software Foundation. All rights reserved.