wt.part
Class QuantityUnit

java.lang.Object
  extended bywt.fc.EnumeratedType
      extended bywt.part.QuantityUnit
All Implemented Interfaces:
EnumeratedType, LocalizableMessage, LocalizableMetadata, Message, Serializable

public final class QuantityUnit
extends EnumeratedType
implements Serializable

An enumeration of units of measure, with EA (each) meaning that the amount in the Quantity is the count of parts and AS_NEEDED meaning use as much as necessary of some supply such as oil; other units of measure would be for items like rope or ballast that would have a length or a weight.

Supported API: true

Extendable: false

See Also:
Serialized Form

Nested Class Summary
 
Nested classes inherited from class wt.fc.EnumeratedType
 
Field Summary
static QuantityUnit AS_NEEDED
          

Supported API: true
private static String CLASS_RESOURCE
           
private static String CLASSNAME
           
static QuantityUnit EA
          

Supported API: true
static QuantityUnit KG
          

Supported API: true
static QuantityUnit L
          

Supported API: true
private static Hashtable localeSets
           
static QuantityUnit M
          

Supported API: true
private static String RESOURCE
           
private static EnumeratedType[] valueSet
           
 
Fields inherited from class wt.fc.EnumeratedType
secretHandshake, SEP_CHAR
 
Fields inherited from interface wt.meta.EnumeratedType
DEFAULT_VALUE, ORDER, SELECTABLE
 
Constructor Summary
protected QuantityUnit()
          Used by sub-classes that need a default constructor.
 
Method Summary
protected  EnumeratedType[] getLocaleSet(Locale locale)
          Returns the set of values (instances) for this instance, for the specified locale.
static QuantityUnit getQuantityUnitDefault()
          Returns the default value (instance) for the QuantityUnit set.
static QuantityUnit[] getQuantityUnitSet()
          Returns a copy of the set of valid values (instances) for the QuantityUnit class.
 EnumeratedType[] getValueSet()
          Returns a copy of the set of valid values (instances) for this instance, for the current user locale.
private static EnumeratedType[] initializeLocaleSet(Locale locale)
           
static QuantityUnit newQuantityUnit(int secretHandshake)
          Used by EnumeratedType for constructing instances of QuantityUnit, from a resource bundle.
static QuantityUnit toQuantityUnit(String internal_value)
          Returns the QuantityUnit instance for the internal_value argument.
protected  EnumeratedType[] valueSet()
          Returns a reference to the set of valid values (instances) for this instance.
 
Methods inherited from class wt.fc.EnumeratedType
defaultEnumeratedType, dynamicInstance, equals, getAbbreviatedDisplay, getComment, getComment, getDisplay, getDisplay, getFullDisplay, getInternalKey, getLocalizedMessage, getLocalizedValues, getLongDescription, getOrder, getSelectableValueSet, getShortDescription, getShortDescription, getStringValue, getStringValue, getValidSet, getValue, hashCode, instantiateSet, isDefaultValue, isDefaultValue, isPrimaryKey, isSelectable, main, readResolve, toEnumeratedType, toEnumeratedType, toEnumeratedType, toString, validateFriendship
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

RESOURCE

private static final String RESOURCE
See Also:
Constant Field Values

CLASSNAME

private static final String CLASSNAME

CLASS_RESOURCE

private static final String CLASS_RESOURCE
See Also:
Constant Field Values

valueSet

private static final EnumeratedType[] valueSet

localeSets

private static Hashtable localeSets

EA

public static final QuantityUnit EA


Supported API: true


AS_NEEDED

public static final QuantityUnit AS_NEEDED


Supported API: true


KG

public static final QuantityUnit KG


Supported API: true


M

public static final QuantityUnit M


Supported API: true


L

public static final QuantityUnit L


Supported API: true

Constructor Detail

QuantityUnit

protected QuantityUnit()
Used by sub-classes that need a default constructor.

Supported API: false

Method Detail

newQuantityUnit

public static QuantityUnit newQuantityUnit(int secretHandshake)
                                    throws IllegalAccessException
Used by EnumeratedType for constructing instances of QuantityUnit, from a resource bundle.

Supported API: false

Parameters:
secretHandshake -
Returns:
QuantityUnit
Throws:
IllegalAccessException

toQuantityUnit

public static QuantityUnit toQuantityUnit(String internal_value)
                                   throws WTInvalidParameterException
Returns the QuantityUnit instance for the internal_value argument.

Supported API: true

Parameters:
internal_value - The internal (persistent) value for a valid instance of QuantityUnit.
Returns:
QuantityUnit
Throws:
WTInvalidParameterException

getQuantityUnitDefault

public static QuantityUnit getQuantityUnitDefault()
Returns the default value (instance) for the QuantityUnit set.

Supported API: true

Returns:
QuantityUnit

getQuantityUnitSet

public static QuantityUnit[] getQuantityUnitSet()
Returns a copy of the set of valid values (instances) for the QuantityUnit class.

Supported API: true

Returns:
QuantityUnit[]

getValueSet

public EnumeratedType[] getValueSet()
Returns a copy of the set of valid values (instances) for this instance, for the current user locale.

Supported API: true

Specified by:
getValueSet in class EnumeratedType
Returns:
EnumeratedType[]

valueSet

protected EnumeratedType[] valueSet()
Returns a reference to the set of valid values (instances) for this instance.

Supported API: false

Specified by:
valueSet in class EnumeratedType
Returns:
EnumeratedType[]

getLocaleSet

protected EnumeratedType[] getLocaleSet(Locale locale)
Returns the set of values (instances) for this instance, for the specified locale.

Supported API: false

Specified by:
getLocaleSet in class EnumeratedType
Parameters:
locale -
Returns:
EnumeratedType[]

initializeLocaleSet

private static EnumeratedType[] initializeLocaleSet(Locale locale)
                                             throws Throwable
Parameters:
locale -
Returns:
EnumeratedType[]
Throws:
Throwable