eaLib API Docs
Last Modified : January 7 2002

mss.ea.eval
Class IntegerScore

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

public class IntegerScore
extends AbstractScore

Integer score. The higher the int value, the better the score.

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

Field Summary
protected  int score
          Score value.
 
Fields inherited from interface mss.ea.core.Score
serialVersionUID
 
Constructor Summary
IntegerScore(int score)
          Constructor with initial score.
 
Method Summary
 int compareTo(java.lang.Object o)
          Compares two scores.
 int intValue()
          Gets the value of the score as int.
 void setValue(int score)
          Sets a new value.
 java.lang.String toString()
          Returns a string representation.
 java.lang.Object value()
          Gets the value of the score as an Integer 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 int score
Score value.
Constructor Detail

IntegerScore

public IntegerScore(int score)
Constructor with initial score.
Parameters:
score - score
Method Detail

value

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

setValue

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

intValue

public int intValue()
Gets the value of the score as int.
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