public class ScoredString
extends java.lang.Object
implements java.lang.Comparable, java.io.Serializable
| Modifier and Type | Field and Description |
|---|---|
protected double |
score
The string score.
|
protected java.lang.String |
string
The string.
|
| Constructor and Description |
|---|
ScoredString()
Create scored string.
|
ScoredString(java.lang.String string,
double score)
Create scored string.
|
| Modifier and Type | Method and Description |
|---|---|
int |
compareTo(java.lang.Object other)
Compare this scored string with another.
|
boolean |
equals(java.lang.Object other)
Check if another object is equal to this one.
|
double |
getScore()
Get score.
|
java.lang.String |
getString()
Get string.
|
void |
putString(java.lang.String string)
Set string.
|
void |
setScore(double score)
Set score.
|
java.lang.String |
toString()
Generate displayable string.
|
protected java.lang.String string
protected double score
public ScoredString()
public ScoredString(java.lang.String string,
double score)
string - String.score - Score.public java.lang.String getString()
public void putString(java.lang.String string)
string - The string.public double getScore()
public void setScore(double score)
score - The score.public java.lang.String toString()
toString in class java.lang.Objectpublic boolean equals(java.lang.Object other)
equals in class java.lang.Objectother - Other object to test for equality.public int compareTo(java.lang.Object other)
compareTo in interface java.lang.Comparableother - The other scored string