sbc.orthoxml
Class Scoreable

java.lang.Object
  extended by sbc.orthoxml.Scoreable
Direct Known Subclasses:
Group, Membership

public abstract class Scoreable
extends java.lang.Object

Allows to assign scores to subclasses.

Author:
Thomas Schmitt

Constructor Summary
Scoreable()
           
 
Method Summary
 void addScore(ScoreDefinition scoreDefinition, java.lang.Double score)
          Adds a score for with given type.
 java.util.Set<ScoreDefinition> getDefinedScores()
          Return all scores that are defined for this object.
 java.util.List<java.lang.Double> getScores(ScoreDefinition scoreDefinition)
          Returns the scores for the given type.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Scoreable

public Scoreable()
Method Detail

addScore

public void addScore(ScoreDefinition scoreDefinition,
                     java.lang.Double score)
Adds a score for with given type. There can multiple scores for the same type.

Parameters:
scoreDefinition - the type of the score
score - the value of the score

getScores

public java.util.List<java.lang.Double> getScores(ScoreDefinition scoreDefinition)
Returns the scores for the given type. There can multiple scores for the same type.

Parameters:
scoreDefinition - the type of the score
Returns:
The scores for the given type. Empty list if none.

getDefinedScores

public java.util.Set<ScoreDefinition> getDefinedScores()
Return all scores that are defined for this object.

Returns:
The scores that are defined for this object. Empty set if nonen.