|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object edu.northwestern.at.utils.ScoredString
public class ScoredString
Associates a string with a score.
Field Summary | |
---|---|
protected double |
score
The string score. |
protected java.lang.String |
string
The string. |
Constructor Summary | |
---|---|
ScoredString()
Create scored string. |
|
ScoredString(java.lang.String string,
double score)
Create scored string. |
Method Summary | |
---|---|
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. |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected java.lang.String string
protected double score
Constructor Detail |
---|
public ScoredString()
public ScoredString(java.lang.String string, double score)
string
- String.score
- Score. Method Detail |
---|
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.Object
public boolean equals(java.lang.Object other)
equals
in class java.lang.Object
other
- Other object to test for equality.
public int compareTo(java.lang.Object other)
compareTo
in interface java.lang.Comparable
other
- The other scored string
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |