hades.utils
Class TimeFormatter

java.lang.Object
  extended byhades.utils.TimeFormatter

public class TimeFormatter
extends java.lang.Object

utility to format double values.

TimeFormatter - format a double representing a simulation time as 'xxxxx.uuu,vvv,www,zzz' for better readability.

Because the f***ing NumberFormat class don't support even such simple tasks, we have to do it by hand.


Field Summary
(package private) static java.text.NumberFormat nf
           
(package private) static int nfracdigits
           
 
Constructor Summary
TimeFormatter()
           
 
Method Summary
static java.lang.String format(double d)
           
static void main(java.lang.String[] argv)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

nf

static java.text.NumberFormat nf

nfracdigits

static int nfracdigits
Constructor Detail

TimeFormatter

public TimeFormatter()
Method Detail

format

public static java.lang.String format(double d)

main

public static void main(java.lang.String[] argv)