to.etc.domui.component.meta
Enum NumericPresentation

java.lang.Object
  extended by java.lang.Enum<NumericPresentation>
      extended by to.etc.domui.component.meta.NumericPresentation
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable<NumericPresentation>

public enum NumericPresentation
extends java.lang.Enum<NumericPresentation>

Default numeric representations that can be used.

Author:
Frits Jalvingh Created on Jul 30, 2009

Enum Constant Summary
MONEY
          Default monetary representation.
MONEY_FULL
          Display as amount with currency symbol, thousands separators, decimal point and complete fraction (always)
MONEY_FULL_TRUNC
          Display as full, but if the fraction (cents) is all zeroes remove them
MONEY_NO_SYMBOL
          Display as a number having thousands separator and fraction but without currency symbol
MONEY_NUMERIC
          Just the amount, including faction, without any unnecessary adornments
NUMBER
          Just a run-of-the-mill number, containing only a fraction separator when needed
NUMBER_FULL
          Fully embellished number, with thousand separators and such
NUMBER_SCIENTIFIC
          Presented in full precision, moving to scientific (x.xxEyy) mode when needed
UNKNOWN
          No explicit presentation set.
 
Method Summary
static boolean isMonetary(NumericPresentation np)
           
static NumericPresentation valueOf(java.lang.String name)
          Returns the enum constant of this type with the specified name.
static NumericPresentation[] values()
          Returns an array containing the constants of this enum type, in the order they are declared.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

UNKNOWN

public static final NumericPresentation UNKNOWN
No explicit presentation set.


NUMBER

public static final NumericPresentation NUMBER
Just a run-of-the-mill number, containing only a fraction separator when needed


NUMBER_SCIENTIFIC

public static final NumericPresentation NUMBER_SCIENTIFIC
Presented in full precision, moving to scientific (x.xxEyy) mode when needed


NUMBER_FULL

public static final NumericPresentation NUMBER_FULL
Fully embellished number, with thousand separators and such


MONEY

public static final NumericPresentation MONEY
Default monetary representation.


MONEY_FULL

public static final NumericPresentation MONEY_FULL
Display as amount with currency symbol, thousands separators, decimal point and complete fraction (always)


MONEY_FULL_TRUNC

public static final NumericPresentation MONEY_FULL_TRUNC
Display as full, but if the fraction (cents) is all zeroes remove them


MONEY_NO_SYMBOL

public static final NumericPresentation MONEY_NO_SYMBOL
Display as a number having thousands separator and fraction but without currency symbol


MONEY_NUMERIC

public static final NumericPresentation MONEY_NUMERIC
Just the amount, including faction, without any unnecessary adornments

Method Detail

values

public static NumericPresentation[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
for (NumericPresentation c : NumericPresentation.values())
    System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they are declared

valueOf

public static NumericPresentation valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Parameters:
name - the name of the enum constant to be returned.
Returns:
the enum constant with the specified name
Throws:
java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
java.lang.NullPointerException - if the argument is null

isMonetary

public static boolean isMonetary(NumericPresentation np)