org.android.activityminer.logic.features.calculators
Class AbstractCalculator<T extends Enum<T> & Dimensions,U>

Package class diagram package AbstractCalculator
java.lang.Object
  extended by org.android.activityminer.logic.features.calculators.AbstractCalculator<T,U>
Type Parameters:
T - the enumeration type for the dimensions
U - the value type
All Implemented Interfaces:
Calculator<U>
Direct Known Subclasses:
AbstractCompositeCalculator, AbstractObservationBasedCalculator

public abstract class AbstractCalculator<T extends Enum<T> & Dimensions,U>
extends Object
implements Calculator<U>

This is the base implementation for all calculator types.


Field Summary
protected  T dimension
          The dimension of the times series to operate on.
protected  U value
          The current value of the feature.
 
Constructor Summary
AbstractCalculator(T dimension)
          Constructor
 
Method Summary
 T getDimension()
          Getter for the operating dimension
 U getValue()
          Getter for the calculator value
 void reset()
          Method to reset the calculator value.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.android.activityminer.logic.features.calculators.Calculator
getInitialValue
 

Field Detail

dimension

protected final T extends Enum<T> & Dimensions dimension
The dimension of the times series to operate on.


value

protected U value
The current value of the feature.

Constructor Detail

AbstractCalculator

public AbstractCalculator(T dimension)
Constructor

Parameters:
dimension - the times series dimension to operate on
Method Detail

getDimension

public final T getDimension()
Getter for the operating dimension

Returns:
the operating dimension

reset

public void reset()
Description copied from interface: Calculator
Method to reset the calculator value.

Specified by:
reset in interface Calculator<U>

getValue

public U getValue()
Description copied from interface: Calculator
Getter for the calculator value

Specified by:
getValue in interface Calculator<U>
Returns:
the calculator value