ch.tatool.core.element.handler.score
Class FactorPointAdaptor

java.lang.Object
  extended by ch.tatool.core.element.AbstractPropertyHolder
      extended by ch.tatool.core.element.NodeImpl
          extended by ch.tatool.core.element.handler.score.AbstractPointAdaptor
              extended by ch.tatool.core.element.handler.score.FactorPointAdaptor
All Implemented Interfaces:
PointsAndLevelHandler.PointAdaptor, PropertyHolder, Node

public class FactorPointAdaptor
extends AbstractPointAdaptor

Allows adapting the points by a factor.

Author:
Michael Ruflin

Field Summary
static String PROPERTY_FACTOR
          Property that stores the factor.
 
Constructor Summary
FactorPointAdaptor()
          Default constructor.
FactorPointAdaptor(int factor)
          Constructor initializing the adaptor with factor x.
 
Method Summary
 void adaptPoints(PointsAndLevelHandler handler, ExecutionContext context)
          Adapts the points according to a factor.
 int getFactor()
           
 void setFactor(int factor)
           
 
Methods inherited from class ch.tatool.core.element.handler.score.AbstractPointAdaptor
getDescription, getMaxPointsToAdapt, getMinPointsToAdapt, getPointsToAdapt, setAdaptedMaxPoints, setAdaptedMinPoints, setAdaptedPoints, setDescription
 
Methods inherited from class ch.tatool.core.element.NodeImpl
assignParent, assignParent, assignParents, getId, getLocalId, getParent, setId, setLocalId, setParent
 
Methods inherited from class ch.tatool.core.element.AbstractPropertyHolder
clearProperties, getKeys, getProperty, removeProperty, setProperty
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface ch.tatool.data.PropertyHolder
clearProperties, getKeys, getProperty, removeProperty, setProperty
 

Field Detail

PROPERTY_FACTOR

public static final String PROPERTY_FACTOR
Property that stores the factor.

See Also:
Constant Field Values
Constructor Detail

FactorPointAdaptor

public FactorPointAdaptor()
Default constructor. Initializes the adaptor with factor 1


FactorPointAdaptor

public FactorPointAdaptor(int factor)
Constructor initializing the adaptor with factor x.

Method Detail

setFactor

public void setFactor(int factor)

getFactor

public int getFactor()

adaptPoints

public void adaptPoints(PointsAndLevelHandler handler,
                        ExecutionContext context)
Adapts the points according to a factor.

Specified by:
adaptPoints in interface PointsAndLevelHandler.PointAdaptor
Specified by:
adaptPoints in class AbstractPointAdaptor


Copyright © 2012. All Rights Reserved.