<MyMathCalcPlugin Project>/src/org/myorg/mymathcalcplugin/AbstractComputationPerformer.java
/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package org.myorg.mymathcalcplugin;

import com.im.df.api.capabilities.DFFieldFloatCapability;
import com.im.df.api.capabilities.DFFieldIntegerCapability;

/**
 *
 */
public abstract class AbstractComputationPerformer implements ComputationPerformer {

    private static final Class[] DEFAULT_SUPPORTED_CAPABILITIES = new Class[] {
        DFFieldFloatCapability.class,
        DFFieldIntegerCapability.class
    };

    private int counter = 0;

    @Override
    public void reset() {
        counter = 0;
    }

    public int getCount() {
        return counter;
    }

    @Override
    public void addValue(Object value) {
        counter++;
    }

    @Override
    public Class[] getSupportedFieldCapabilities() {
        return DEFAULT_SUPPORTED_CAPABILITIES;
    }
}