eaLib API Docs
Last Modified : January 7 2002

mss.ea.eval
Class LongScore

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

public class LongScore
extends AbstractScore

Long score. The higher the long value, the better the score.

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

Field Summary
protected  long score
          Score value.
 
Fields inherited from interface mss.ea.core.Score
serialVersionUID
 
Constructor Summary
LongScore(long score)
          Constructor with initial score.
 
Method Summary
 int compareTo(java.lang.Object o)
          Compares two scores.
 long longValue()
          Gets the value of the score as long.
 void setValue(long 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 Long 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 long score
Score value.
Constructor Detail

LongScore

public LongScore(long score)
Constructor with initial score.
Parameters:
score - score
Method Detail

value

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

setValue

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

longValue

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