cdx.scorebot.scoring
Class ScoreEvent

java.lang.Object
  extended by cdx.scorebot.util.Event
      extended by cdx.scorebot.scoring.ScoreEvent
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
ManualScoreEvent, TestScoreEvent

public abstract class ScoreEvent
extends Event
implements java.io.Serializable

describes a change in score due to a penalty or bonus (includes all relevant information as to why)

Author:
David Underhill
See Also:
Serialized Form

Constructor Summary
ScoreEvent(int scoreChange, java.lang.String title, java.lang.String msg)
          Creates the ScoreEvent from the specified parameters.
 
Method Summary
 java.lang.String getExplanation()
          gets why this score event was created (explains the score change)
 ScoringInfo getScoringInfo()
          gets the object which contains the score change as a result of this event as well as any thresholds which modify that change
 java.lang.String getTitle()
          gets the title of the event
 void setExplanation(java.lang.String explanation)
          sets why this score event was created (explains the score change)
 void setTitle(java.lang.String title)
          sets the title of the event
 java.lang.String toString()
           
 
Methods inherited from class cdx.scorebot.util.Event
getFilename, getTimeGenerated, getTimeReported, isReported, setFilename, setTimeGenerated, setTimeReported
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ScoreEvent

public ScoreEvent(int scoreChange,
                  java.lang.String title,
                  java.lang.String msg)
Creates the ScoreEvent from the specified parameters.

Parameters:
scoreChange - the number of points to add to the score (negative number => penalty)
title - a descriptive heading for the event
msg - explanation for the score change
Method Detail

getExplanation

public java.lang.String getExplanation()
gets why this score event was created (explains the score change)


setExplanation

public void setExplanation(java.lang.String explanation)
sets why this score event was created (explains the score change)


getScoringInfo

public ScoringInfo getScoringInfo()
gets the object which contains the score change as a result of this event as well as any thresholds which modify that change


getTitle

public java.lang.String getTitle()
gets the title of the event


setTitle

public void setTitle(java.lang.String title)
sets the title of the event


toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object