|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectde.unidu.is.util.WeightedString
A (string,weight) pair, which can be sorted with decreasing weights.
| Field Summary | |
protected java.lang.String |
string
The string. |
protected double |
weight
The weight of the string. |
| Constructor Summary | |
WeightedString()
Creates a new, empty instance. |
|
WeightedString(java.lang.String string,
double weight)
Creates a new instance. |
|
| Method Summary | |
int |
compareTo(java.lang.Object obj)
Compares this entry (the score in decreasing order) with the specified one. |
boolean |
equals(java.lang.Object obj)
|
java.lang.String |
getString()
Returns the string. |
double |
getWeight()
Returns the weight of the string. |
int |
hashCode()
|
void |
setString(java.lang.String string)
Sets the string. |
void |
setWeight(double weight)
Sets the weight of the string. |
java.lang.String |
toString()
|
| Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
protected java.lang.String string
protected double weight
| Constructor Detail |
public WeightedString()
public WeightedString(java.lang.String string,
double weight)
string - stringweight - weight| Method Detail |
public java.lang.String getString()
public void setString(java.lang.String string)
string - string.public double getWeight()
public void setWeight(double weight)
weight - weight of the stringpublic boolean equals(java.lang.Object obj)
public int compareTo(java.lang.Object obj)
compareTo in interface java.lang.Comparableobj - the reference object with which to compare.
public int hashCode()
public java.lang.String toString()
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||