cdx.scorebot.scoring
Class ScoringRule.BasicCodeGenerator

java.lang.Object
  extended by cdx.scorebot.scoring.ScoringRule.BasicCodeGenerator
All Implemented Interfaces:
java.io.Serializable
Enclosing class:
ScoringRule

public class ScoringRule.BasicCodeGenerator
extends java.lang.Object
implements java.io.Serializable

defines the fields which are used to generate the code for a basic rule

See Also:
Serialized Form

Constructor Summary
ScoringRule.BasicCodeGenerator()
           
 
Method Summary
 java.lang.String buildCode()
          generates the code this object represents
 boolean equals(java.lang.Object o)
           
 java.lang.String getComparisonOp()
          gets the string representing the relational or equality operator to compare the result and expected value with
 java.lang.String getExpectedValue()
          gets the value the test result is expected to be
 ScoringRule.BASIC_METHOD_TYPE getMethod()
          gets the method to execute if the condition is met
 int getMinCountToAccept()
          gets the minimum number of successful comparisons to accept (i.e.
 java.lang.String getMsg()
          gets the message associated with the score change
 int getNumPoints()
          gets the number of points to change the score by (negative of this taken if the penalty method being used.
 int getNumResultsToCheck()
          gets the number of results from this test to check
 java.lang.String getResultName()
          gets the name of the result which is being checked
 java.lang.String getTestName()
          gets the name of the test whose result is being checked
 java.lang.String getTitle()
          gets a descriptive heading associated with the score change
 boolean isReported()
          gets whether or not this event will be known to the user
 void setComparisonOp(java.lang.String comparisonOp)
          sets the string representing the relational or equality operator to compare the result and expected value with
 void setExpectedValue(java.lang.String expectedValue)
          sets the value the test result is expected to be
 void setMethod(ScoringRule.BASIC_METHOD_TYPE method)
          sets the method to execute if the condition is met
 void setMinCountToAccept(int minCountToAccept)
          sets the minimum number of successful comparisons to accept (i.e.
 void setMsg(java.lang.String msg)
          sets the message associated with the score change
 void setNumPoints(int numPoints)
          sets the number of points to change the score by (negative of this taken if the penalty method being used.
 void setNumResultsToCheck(int numResultsToCheck)
          sets the number of results from this test to check (must be at least one)
 void setReported(boolean reported)
          sets whether or not this event will be known to the user
 void setResultName(java.lang.String resultName)
          sets the name of the result which is being checked
 void setTestName(java.lang.String testName)
          sets the name of the test whose result is being checked
 void setTitle(java.lang.String title)
          sets a descriptive heading associated with the score change
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ScoringRule.BasicCodeGenerator

public ScoringRule.BasicCodeGenerator()
Method Detail

buildCode

public java.lang.String buildCode()
generates the code this object represents


getTestName

public java.lang.String getTestName()
gets the name of the test whose result is being checked


setTestName

public void setTestName(java.lang.String testName)
sets the name of the test whose result is being checked


getResultName

public java.lang.String getResultName()
gets the name of the result which is being checked


setResultName

public void setResultName(java.lang.String resultName)
sets the name of the result which is being checked


getComparisonOp

public java.lang.String getComparisonOp()
gets the string representing the relational or equality operator to compare the result and expected value with


setComparisonOp

public void setComparisonOp(java.lang.String comparisonOp)
sets the string representing the relational or equality operator to compare the result and expected value with


getExpectedValue

public java.lang.String getExpectedValue()
gets the value the test result is expected to be


setExpectedValue

public void setExpectedValue(java.lang.String expectedValue)
sets the value the test result is expected to be


getNumResultsToCheck

public int getNumResultsToCheck()
gets the number of results from this test to check


setNumResultsToCheck

public void setNumResultsToCheck(int numResultsToCheck)
                          throws IllegalArgValException
sets the number of results from this test to check (must be at least one)

Throws:
IllegalArgValException

getMethod

public ScoringRule.BASIC_METHOD_TYPE getMethod()
gets the method to execute if the condition is met


setMethod

public void setMethod(ScoringRule.BASIC_METHOD_TYPE method)
sets the method to execute if the condition is met


getNumPoints

public int getNumPoints()
gets the number of points to change the score by (negative of this taken if the penalty method being used.


setNumPoints

public void setNumPoints(int numPoints)
sets the number of points to change the score by (negative of this taken if the penalty method being used.


getTitle

public java.lang.String getTitle()
gets a descriptive heading associated with the score change


setTitle

public void setTitle(java.lang.String title)
sets a descriptive heading associated with the score change


getMsg

public java.lang.String getMsg()
gets the message associated with the score change


setMsg

public void setMsg(java.lang.String msg)
sets the message associated with the score change


getMinCountToAccept

public int getMinCountToAccept()
gets the minimum number of successful comparisons to accept (i.e. number of times result op expectedValue must be true)


setMinCountToAccept

public void setMinCountToAccept(int minCountToAccept)
                         throws IllegalArgValException
sets the minimum number of successful comparisons to accept (i.e. number of times result op expectedValue must be true)

Throws:
IllegalArgValException

isReported

public boolean isReported()
gets whether or not this event will be known to the user


setReported

public void setReported(boolean reported)
sets whether or not this event will be known to the user


equals

public boolean equals(java.lang.Object o)
Overrides:
equals in class java.lang.Object