public class PairOfFloatInt extends Object implements org.apache.hadoop.io.WritableComparable<PairOfFloatInt>
| Modifier and Type | Class and Description |
|---|---|
static class |
PairOfFloatInt.Comparator
Comparator optimized for
PairOfFloatInt. |
| Constructor and Description |
|---|
PairOfFloatInt()
Creates a pair.
|
PairOfFloatInt(float left,
int right)
Creates a pair.
|
| Modifier and Type | Method and Description |
|---|---|
PairOfFloatInt |
clone()
Clones this object.
|
int |
compareTo(PairOfFloatInt pair)
Defines a natural sort order for pairs.
|
boolean |
equals(Object obj)
Checks two pairs for equality.
|
float |
getKey()
Returns the key (left element).
|
float |
getLeftElement()
Returns the left element.
|
int |
getRightElement()
Returns the right element.
|
int |
getValue()
Returns the value (right element).
|
int |
hashCode()
Returns a hash code value for the pair.
|
void |
readFields(DataInput in)
Deserializes this pair.
|
void |
set(float left,
int right)
Sets the right and left elements of this pair.
|
String |
toString()
Generates human-readable String representation of this pair.
|
void |
write(DataOutput out)
Serializes this pair.
|
public PairOfFloatInt()
public PairOfFloatInt(float left,
int right)
left - the left elementright - the right elementpublic void readFields(DataInput in) throws IOException
readFields in interface org.apache.hadoop.io.Writablein - source for raw byte representationIOExceptionpublic void write(DataOutput out) throws IOException
write in interface org.apache.hadoop.io.Writableout - where to write the raw byte representationIOExceptionpublic float getLeftElement()
public int getRightElement()
public float getKey()
public int getValue()
public void set(float left,
int right)
left - the left elementright - the right elementpublic boolean equals(Object obj)
public int compareTo(PairOfFloatInt pair)
compareTo in interface Comparable<PairOfFloatInt>obj.public int hashCode()
public String toString()
public PairOfFloatInt clone()
Copyright © 2018. All rights reserved.