public class Score extends Object implements Comparable, Cloneable
Score
object
simply contains a score and the associated discrete classification.Modifier and Type | Field and Description |
---|---|
double |
score
The score.
|
String |
value
The discrete classification associated with this score.
|
Constructor and Description |
---|
Score(String v,
double s)
Initializes both member variables.
|
Modifier and Type | Method and Description |
---|---|
Object |
clone()
Produces a deep copy of this object.
|
int |
compareTo(Object o)
This method is implemented so that a collection of
Score s will be sorted first
by value and then by score. |
String |
toString()
The string representation of a
Score is the value followed by the score
separated by a colon. |
public String value
public double score
public Score(String v, double s)
v
- The discrete classification.s
- The score.public int compareTo(Object o)
Score
s will be sorted first
by value and then by score.compareTo
in interface Comparable
o
- The object to compare against.public String toString()
Score
is the value followed by the score
separated by a colon.Copyright © 2016. All rights reserved.