Coalevo Logo

net.coalevo.statistics.model
Interface Counter

All Superinterfaces:
Identifiable
All Known Subinterfaces:
AgentBoundCounter

public interface Counter
extends Identifiable

Defines a simple counter.

A counter is always greater or equal to zero and can only increase.

Version:
1.0.0 (10/02/2009)
Author:
Dieter Wimberger (wimpi)

Method Summary
 long get()
          Returns the value of this counter.
 long increment()
          Increments this counter by one.
 long increment(int i)
          Increments this counter by a given integer value.
 long increment(long l)
          Increments this counter by a given long value.
 void reset()
          Resets this counter to zero.
 
Methods inherited from interface net.coalevo.foundation.model.Identifiable
getIdentifier
 

Method Detail

increment

long increment()
Increments this counter by one.

Returns:
the state of the counter after the increment.

increment

long increment(int i)
Increments this counter by a given integer value.

Parameters:
i - the increment to be added to the counter.
Returns:
the state of the counter after the increment.

increment

long increment(long l)
Increments this counter by a given long value.

Parameters:
l - the increment to be added to the counter.
Returns:
the state of the counter after the increment.

get

long get()
Returns the value of this counter.

Returns:
the counter state.

reset

void reset()
Resets this counter to zero.


Coalevo Logo

(c) 2004-2009 VFI (http://www.vfi.or.at)