01: package com.jamonapi;
02:
03: import java.util.*;
04: import java.text.*;
05:
06: /** Abstract base class for other Monitors **/
07:
08: public abstract class BaseMonitor extends Monitor {
09:
10: public long getAccrued() {
11: return 0;
12: }
13:
14: public String toString() {
15: return "";
16: }
17:
18: public String getAccruedString() {
19: return convertToString(getAccrued());
20: }
21:
22: protected String convertToString(long value) {
23: DecimalFormat numberFormat = (DecimalFormat) NumberFormat
24: .getNumberInstance();
25: numberFormat.applyPattern("#,###");
26: return numberFormat.format(value);
27:
28: }
29:
30: public void reset() {
31:
32: }
33:
34: public void increase(long increaseValue) {
35: }
36:
37: public Monitor start() {
38: return this ;
39: }
40:
41: public Monitor stop() {
42: return this ;
43: }
44:
45: public void getData(ArrayList rowData) {
46:
47: }
48:
49: public void getHeader(ArrayList header) {
50: }
51: }
|