comparison src/org/dancres/blitz/entry/InstanceCheckpoint.java @ 0:3dc0c5604566

Initial checkin of blitz 2.0 fcs - no installer yet.
author Dan Creswell <dan.creswell@gmail.com>
date Sat, 21 Mar 2009 11:00:06 +0000
parents
children
comparison
equal deleted inserted replaced
-1:000000000000 0:3dc0c5604566
1 package org.dancres.blitz.entry;
2
3 import java.io.Serializable;
4
5 import java.util.ArrayList;
6
7 /**
8 If logging of instance counts is enabled, at each checkpoint, we will lodge
9 an instance of this class as a checkpoint contribution
10 */
11 class InstanceCheckpoint implements Serializable {
12 private ArrayList theCounts = new ArrayList();
13 private long theTime = System.currentTimeMillis();
14
15 void add(String aType, int aCount) {
16 theCounts.add(new CountAction(aType, aCount));
17 }
18
19 public String toString() {
20 StringBuffer myBuffer = new StringBuffer();
21
22 for (int i = 0; i < theCounts.size(); i++) {
23 CountAction myCount = (CountAction) theCounts.get(i);
24
25 myBuffer.append(theTime + " :" + myCount.toString() + "\n");
26 }
27
28 return myBuffer.toString();
29 }
30 }