ch.tatool.core.element.handler.score
Class DefaultPointsAndLevelHandler
java.lang.Object
ch.tatool.core.element.AbstractPropertyHolder
ch.tatool.core.element.NodeImpl
ch.tatool.core.element.handler.score.AbstractPointsAndLevelHandler
ch.tatool.core.element.handler.score.DefaultPointsAndLevelHandler
- All Implemented Interfaces:
- PointsAndLevelHandler, PropertyHolder, Node, ExecutionPhaseListener
public class DefaultPointsAndLevelHandler
- extends AbstractPointsAndLevelHandler
Default implementation of a score and level handler. Checks for the
performance after all n trials
- Author:
- Andre Locher
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
PROPERTY_LEVEL_COUNTER
public static final String PROPERTY_LEVEL_COUNTER
- See Also:
- Constant Field Values
PROPERTY_LEVEL_PERFORMANCE
public static final String PROPERTY_LEVEL_PERFORMANCE
- See Also:
- Constant Field Values
PROPERTY_LEVEL_TOTALPOINTS
public static final String PROPERTY_LEVEL_TOTALPOINTS
- See Also:
- Constant Field Values
PROPERTY_LEVEL_MAXPOINTS
public static final String PROPERTY_LEVEL_MAXPOINTS
- See Also:
- Constant Field Values
DefaultPointsAndLevelHandler
public DefaultPointsAndLevelHandler()
initializeHandler
protected void initializeHandler(ExecutionContext context)
- Initializes the algorithm with the values of the DB at session start
- Specified by:
initializeHandler in class AbstractPointsAndLevelHandler
initializeAlgorithm
public void initializeAlgorithm(ExecutionContext event)
- Initializes the algorithm with the values of the DB.
checkLevelChange
protected int checkLevelChange(ExecutionContext context,
int currentLevel)
- Description copied from class:
AbstractPointsAndLevelHandler
- Overwrite to implement a different level/points logic.
Default logic simply uses += level = > +- 100.
- Specified by:
checkLevelChange in class AbstractPointsAndLevelHandler
- Returns:
- the new level. This can be the old level value
getPerformanceData
public HashMap<Integer,Integer> getPerformanceData()
getLevelData
public HashMap<Integer,Integer> getLevelData()
getMaxThreshold
public double getMaxThreshold()
setMaxThreshold
public void setMaxThreshold(double maxThreshold)
getMinThreshold
public double getMinThreshold()
setMinThreshold
public void setMinThreshold(double minThreshold)
getSampleSize
public int getSampleSize()
setSampleSize
public void setSampleSize(int sampleSize)
Copyright © 2012. All Rights Reserved.