Package uk.ac.manchester.spinnaker.utils
Class Counter
java.lang.Object
uk.ac.manchester.spinnaker.utils.Counter
Thin wrapper around an 
int for counting.
 This allows the object to be final and therefore passed into inner classes.
This is not thread safe.
- Author:
- Christian-B
- 
Constructor SummaryConstructors
- 
Method Summary
- 
Constructor Details- 
Counterpublic Counter()Create a counter starting at zero.
 
- 
- 
Method Details- 
incrementpublic void increment()Add one to the count.
- 
addpublic void add(int other) Add any amount to the counter.Could also be used to add a negative number. - Parameters:
- other- int values by which to change the counter.
 
- 
getpublic int get()Retrieve the current value.- Returns:
- The current counter value.
 
 
-