|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.bigdata.counters.render.ValueFormatter
public abstract class ValueFormatter
Datum specific formatting of ICounter values (not thread-safe since
the Format objects are not thread-safe).
| Field Summary | |
|---|---|
protected Format |
dateFormat
Used to format date/time values. |
protected DecimalFormat |
decimalFormat
Used to format double and float counter values. |
protected NumberFormat |
integerFormat
Used to format integer and long counter values. |
protected static Pattern |
percent_pattern
A pattern matching the occurrence of the word "percent" in a counter name. |
protected NumberFormat |
percentFormat
Used to format counter values that can be inferred to be a percentage. |
protected DecimalFormat |
unitsFormat
Used to format the units of time when expressed as elapsed units since the first sample of a History. |
| Constructor Summary | |
|---|---|
ValueFormatter(URLQueryModel model)
|
|
| Method Summary | |
|---|---|
String |
date(long timestamp)
Format a timestamp as a date. |
abstract String |
value(ICounter counter,
Object val)
Formats a counter value as a String. |
abstract void |
writeFullPath(Writer w,
String path)
Write the full counter path. |
abstract void |
writePath(Writer w,
String path,
int rootDepth)
Write a partial counter path. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected final DecimalFormat decimalFormat
protected final NumberFormat percentFormat
protected final NumberFormat integerFormat
protected final DecimalFormat unitsFormat
History.
protected final Format dateFormat
protected static final Pattern percent_pattern
| Constructor Detail |
|---|
public ValueFormatter(URLQueryModel model)
| Method Detail |
|---|
public abstract String value(ICounter counter,
Object val)
counter - The counter.value - The counter value (MAY be null).
public abstract void writeFullPath(Writer w,
String path)
throws IOException
IOException
public abstract void writePath(Writer w,
String path,
int rootDepth)
throws IOException
rootDepth - The path components will be shown beginning at this depth -
ZERO (0) is the root.
IOExceptionpublic String date(long timestamp)
timestamp - The timestamp value.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||