com.bigdata.counters.render
Class TextValueFormatter

java.lang.Object
  extended by com.bigdata.counters.render.ValueFormatter
      extended by com.bigdata.counters.render.TextValueFormatter

public class TextValueFormatter
extends ValueFormatter

Version:
$Id: TextValueFormatter.java 2265 2009-10-26 12:51:06Z thompsonbry $
Author:
Bryan Thompson

Field Summary
 
Fields inherited from class com.bigdata.counters.render.ValueFormatter
dateFormat, decimalFormat, integerFormat, percent_pattern, percentFormat, unitsFormat
 
Constructor Summary
TextValueFormatter(URLQueryModel model)
           
 
Method Summary
 String value(ICounter counter, Object val)
          Formats a counter value as a String.
 void writeFullPath(Writer w, String path)
          Write the full counter path.
 void writePath(Writer w, String path, int rootDepth)
          Write a partial counter path.
 
Methods inherited from class com.bigdata.counters.render.ValueFormatter
date
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TextValueFormatter

public TextValueFormatter(URLQueryModel model)
Method Detail

value

public String value(ICounter counter,
                    Object val)
Description copied from class: ValueFormatter
Formats a counter value as a String.

Specified by:
value in class ValueFormatter
Parameters:
counter - The counter.
Returns:
The formatted value.
TODO:
the logic for choosing the Format should be shared by impls but there is also an interaction with rendering links.

writeFullPath

public void writeFullPath(Writer w,
                          String path)
                   throws IOException
Description copied from class: ValueFormatter
Write the full counter path.

Specified by:
writeFullPath in class ValueFormatter
Throws:
IOException

writePath

public void writePath(Writer w,
                      String path,
                      int rootDepth)
               throws IOException
Description copied from class: ValueFormatter
Write a partial counter path.

Specified by:
writePath in class ValueFormatter
rootDepth - The path components will be shown beginning at this depth - ZERO (0) is the root.
Throws:
IOException


Copyright © 2006-2009 SYSTAP, LLC. All Rights Reserved.