com.codetaco.funnel.aggregation.AggregateCount Maven / Gradle / Ivy
package com.codetaco.funnel.aggregation;
import com.codetaco.funnel.parameters.FunnelContext;
/**
*
* AggregateCount class.
*
*
* @author Chris DeGreef [email protected]
*/
public class AggregateCount extends Aggregate
{
protected long counter;
@Override
Object getValueForEquations()
{
return new Long(counter);
}
@Override
void reset()
{
counter = 0;
}
/** {@inheritDoc} */
@Override
public boolean supportsDate()
{
return false;
}
/** {@inheritDoc} */
@Override
public boolean supportsNumber()
{
return false;
}
/**
* @param context
*/
@Override
void update(final FunnelContext context)
{
counter++;
}
}