01: package test.triangle;
02:
03: /**
04: * count the number of times something is called
05: * used to check whether certain methods have been called
06: */
07: public class CountCalls {
08: private static int numCalls = 0;
09:
10: public static void resetNumCalls() {
11: numCalls = 0;
12: }
13:
14: public static void incr() {
15: numCalls++;
16: }
17:
18: public static int getNumCalls() {
19: return numCalls;
20: }
21: }
|