|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectjcckit.util.Format
A helper class for formatting numbers according to a printf-like format string. Each instance of this class is initialized by a format string for a single number.
| Constructor Summary | |
Format(java.lang.String formatString)
Creates an instance for the specified format string. |
|
| Method Summary | |
static Format |
create(ConfigParameters config,
java.lang.String key)
Creates a new instance based of specified key-value pair of the specified configuration parameters. |
java.lang.String |
form(double number)
Format a number. |
java.lang.String |
form(double[] numbers)
Format an array of double numbers. |
java.lang.String |
form(long number)
Format a number. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public Format(java.lang.String formatString)
| d | decimal integer |
| o | octal integer |
| x | hex integer |
| f | floating point number with a fixed decimal point |
| e, E | floating point number in logarithmic format |
| g, G | floating point number rendered either in fixed-decimal format of logarithmic format depending on the size of the mantissa. |
formatString - The format string.
java.lang.IllegalArgumentException - if invalid format string.| Method Detail |
public static Format create(ConfigParameters config,
java.lang.String key)
config - Config parameters.key - The key of the key-value pair in config containing
the format string.
FactoryException - if the format string is invalid.public java.lang.String form(long number)
number - Number to be formated.
public java.lang.String form(double number)
form in interface TicLabelFormatnumber - Number to be formated.
public java.lang.String form(double[] numbers)
numbers - Numbers to be formated.
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||