ch.tatool.core.element.handler.score
Class BoundaryPointsAndLevelHandler
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.BoundaryPointsAndLevelHandler
- All Implemented Interfaces:
- PointsAndLevelHandler, PropertyHolder, Node, ExecutionPhaseListener
public class BoundaryPointsAndLevelHandler
- extends AbstractPointsAndLevelHandler
PointsAndLevelHandler that performs a level change once the number of points pass a boundry value.
- Author:
- Michael Ruflin
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
PROPERTY_CURRENT_LEVEL_TOTAL_POINTS
public static final String PROPERTY_CURRENT_LEVEL_TOTAL_POINTS
- See Also:
- Constant Field Values
PROPERTY_BOUNDARY_VALUE
public static final String PROPERTY_BOUNDARY_VALUE
- See Also:
- Constant Field Values
BoundaryPointsAndLevelHandler
public BoundaryPointsAndLevelHandler()
setBoundaryValue
public void setBoundaryValue(int value)
updateTotals
protected void updateTotals(ExecutionContext context)
- Overridden to also adapt the current level total
- Overrides:
updateTotals in class AbstractPointsAndLevelHandler
checkLevelChange
protected int checkLevelChange(ExecutionContext context,
int currentLevel)
- Compares the current level total value to the boundary value, and adapts the level accordingly.
- Specified by:
checkLevelChange in class AbstractPointsAndLevelHandler
- Returns:
- the new level. This can be the old level value
initializeHandler
protected void initializeHandler(ExecutionContext context)
- Specified by:
initializeHandler in class AbstractPointsAndLevelHandler
Copyright © 2012. All Rights Reserved.