|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcdx.scorebot.scoring.ScoringRuleset
public class ScoringRuleset
Describes how to score the service a TestSuite is testing. It also defines threshold ranges of and initial scores.
Constructor Summary | |
---|---|
ScoringRuleset()
default constructor |
Method Summary | |
---|---|
void |
addScoringRule(ScoringRule rule)
Adds a ScoringRule to be evaluated. |
boolean |
equals(java.lang.Object o)
|
int |
getInitialPoints()
Deprecated. TestSuites no longer contain an initial score -- this is contained by the NetworkTestPackage now. |
int |
getMaxGain()
gets the maximum number points which may be awarded |
int |
getMaxLoss()
gets the maximum number points which may be lost |
java.util.Vector<ScoringRule> |
getRules()
gets list of rules which define how to score test(s) |
ScoringRule |
getScoringRule(int index)
Gets the specified ScoringRule |
java.util.Vector<TestScoreEvent> |
processTestEvent(TestSuite suite,
TestEvent e)
Give each rule a chance to process the TestEvent. |
void |
removeScoringRule(int index)
Removes the ScoringRule from this ScoringRuleset |
void |
setInitialPoints(int initialPoints)
Deprecated. TestSuites no longer contain an initial score -- this is contained by the NetworkTestPackage now. |
void |
setMaxGain(int maxPoints)
sets the maximum number points which may be awarded (absolute value) |
void |
setMaxLoss(int minPoints)
sets the maximum number points which may be awarded (negative absolute value) |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ScoringRuleset()
Method Detail |
---|
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public java.util.Vector<TestScoreEvent> processTestEvent(TestSuite suite, TestEvent e) throws LogicException
suite
- the suite which score events generated by this context refer toe
- the next TestEvent to process (ScoringRule's are STATEFUL, so order matters!)
LogicException
- occurs if a runtime error occurs in the scoring languagepublic int getMaxLoss()
public void setMaxLoss(int minPoints)
public int getMaxGain()
public void setMaxGain(int maxPoints)
public int getInitialPoints()
public void setInitialPoints(int initialPoints) throws IllegalArgValException
IllegalArgValException
public void addScoringRule(ScoringRule rule)
rule
- the ScoringRule to add to this ScoringRulesetpublic void removeScoringRule(int index) throws java.lang.ArrayIndexOutOfBoundsException
index
- remove the ScoringRule at the specified index.
java.lang.ArrayIndexOutOfBoundsException
- if the index was invalid.public ScoringRule getScoringRule(int index) throws java.lang.ArrayIndexOutOfBoundsException
java.lang.ArrayIndexOutOfBoundsException
- if the index was invalid.public java.util.Vector<ScoringRule> getRules()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |