to.etc.domui.component.meta
Enum NumericType

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

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

Represents a toplevel specification of what a numeric value represents. It's most important use is to distinguish between things like simple numbers, monetary values, percentages etc.

Author:
Frits Jalvingh Created on Jul 30, 2009

Enum Constant Summary
AMOUNT
          This represents some monetary amount
DURATION
          Represents a duration.
FACTOR
          Represents some factor (fractional)
NUMBER
          It's just a number.
PERCENTAGE
          Represents a percentage (0..100, fractional)
UNKNOWN
          Not explicity defined; treated as just a number.
 
Method Summary
static NumericType valueOf(java.lang.String name)
          Returns the enum constant of this type with the specified name.
static NumericType[] 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 NumericType UNKNOWN
Not explicity defined; treated as just a number.


NUMBER

public static final NumericType NUMBER
It's just a number.


AMOUNT

public static final NumericType AMOUNT
This represents some monetary amount


DURATION

public static final NumericType DURATION
Represents a duration.


PERCENTAGE

public static final NumericType PERCENTAGE
Represents a percentage (0..100, fractional)


FACTOR

public static final NumericType FACTOR
Represents some factor (fractional)

Method Detail

values

public static NumericType[] 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 (NumericType c : NumericType.values())
    System.out.println(c);

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

valueOf

public static NumericType 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