public class PairOfStringFloat extends Object implements org.apache.hadoop.io.WritableComparable<PairOfStringFloat>
| Modifier and Type | Class and Description |
|---|---|
static class |
PairOfStringFloat.Comparator
Comparator optimized for
PairOfStringFloat. |
| Constructor and Description |
|---|
PairOfStringFloat()
Creates a pair.
|
PairOfStringFloat(String left,
float right)
Creates a pair.
|
| Modifier and Type | Method and Description |
|---|---|
PairOfStringFloat |
clone()
Clones this object.
|
int |
compareTo(PairOfStringFloat pair)
Defines a natural sort order for pairs.
|
boolean |
equals(Object obj)
Checks two pairs for equality.
|
String |
getKey()
Returns the key (left element).
|
String |
getLeftElement()
Returns the left element.
|
float |
getRightElement()
Returns the right element.
|
float |
getValue()
Returns the value (right element).
|
int |
hashCode()
Returns a hash code value for the pair.
|
void |
readFields(DataInput in)
Deserializes the pair.
|
void |
set(String left,
float 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 PairOfStringFloat()
public PairOfStringFloat(String left, float 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 String getLeftElement()
public float getRightElement()
public String getKey()
public float getValue()
public void set(String left, float right)
left - the left elementright - the right elementpublic boolean equals(Object obj)
public int compareTo(PairOfStringFloat pair)
compareTo in interface Comparable<PairOfStringFloat>obj.public int hashCode()
public String toString()
public PairOfStringFloat clone()
Copyright © 2014. All rights reserved.