eaLib API Docs
Last Modified : January 7 2002

mss.ea.eval
Class FloatScore

java.lang.Object
  |
  +--mss.ea.eval.AbstractScore
        |
        +--mss.ea.eval.FloatScore
All Implemented Interfaces:
java.lang.Comparable, Score, java.io.Serializable

public class FloatScore
extends AbstractScore

Float score. The higher the float value, the better the score.

Since:
0.1
Version:
0.1 (06-20-2001)
Author:
Andreas Rummler
See Also:
Serialized Form

Field Summary
protected  float score
          Score value.
 
Fields inherited from interface mss.ea.core.Score
serialVersionUID
 
Constructor Summary
FloatScore(float score)
          Constructor with initial score.
 
Method Summary
 int compareTo(java.lang.Object o)
          Compares two scores.
 float floatValue()
          Gets the value of the score as float.
 void setValue(float score)
          Sets a new value.
 java.lang.String toString()
          Returns a string representation.
 java.lang.Object value()
          Gets the value of the score as a Float object.
 
Methods inherited from class mss.ea.eval.AbstractScore
isBetter, isEqual, isWorse
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

score

protected float score
Score value.
Constructor Detail

FloatScore

public FloatScore(float score)
Constructor with initial score.
Parameters:
score - score
Method Detail

value

public java.lang.Object value()
Gets the value of the score as a Float object.
Overrides:
value in class AbstractScore
Returns:
value of score as Float

setValue

public void setValue(float score)
Sets a new value.
Parameters:
score - new value of score

floatValue

public float floatValue()
Gets the value of the score as float.
Returns:
value of score

toString

public java.lang.String toString()
Returns a string representation.
Overrides:
toString in class java.lang.Object
Returns:
string representation

compareTo

public int compareTo(java.lang.Object o)
Compares two scores. This method returns -1 if this score is better, 0 if both scores are equal and 1 if this score is worse.
Overrides:
compareTo in class AbstractScore
Parameters:
o - score to compare to
Returns:
result of comparison

eaLib API Docs
Last Modified : January 7 2002

Copyright © 2000-2001 Technical University of Ilmenau, Department ESS