com.bristle.javalib.ui
Class DisplayDataTypeEnum

java.lang.Object
  extended by com.bristle.javalib.ui.DisplayDataTypeEnum
All Implemented Interfaces:
Serializable, Comparable

public class DisplayDataTypeEnum
extends Object
implements Serializable, Comparable

This class encapsulates the concept of an data type for displayable data, offering an enumerated type, comparison operators, toString(), the ability to retrieve a Collection of all values, and various other utility functions.

Usage:

   - The typical scenarios for using this class are:

Assumptions:
Effects:
       - None.
Anticipated Changes:
Notes:
Implementation Notes:
Portability Issues:
Revision History:
   $Log$

See Also:
Serialized Form

Nested Class Summary
static class DisplayDataTypeEnum.NoSuchDisplayDataTypeEnumException
          Thrown when a specified value does not match any DisplayDataTypeEnum
 
Field Summary
static DisplayDataTypeEnum DATE_TIME
           
static DisplayDataTypeEnum DICT_STRING
           
static DisplayDataTypeEnum FLOAT
           
static DisplayDataTypeEnum INTEGER
           
static DisplayDataTypeEnum PASSWORD_STRING
           
static DisplayDataTypeEnum STRING
           
 
Method Summary
 int compareTo(Object arg0)
          Compares other objects to this DisplayDataTypeEnum
static Collection getAllDisplayDataTypeEnums()
          Returns a collection of all DisplayDataTypeEnums, sorted by coded string getValue() values.
 String getDescrip()
          A unique human-readable description of the DisplayDataTypeEnum.
static DisplayDataTypeEnum getDisplayDataTypeEnum(String strValue)
          Get a DisplayDataTypeEnum based on its coded string value.
 String getValue()
          The coded string value of the DisplayDataTypeEnum.
 String toString()
          Returns a string representation of the DisplayDataTypeEnum.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

STRING

public static final DisplayDataTypeEnum STRING

PASSWORD_STRING

public static final DisplayDataTypeEnum PASSWORD_STRING

DICT_STRING

public static final DisplayDataTypeEnum DICT_STRING

INTEGER

public static final DisplayDataTypeEnum INTEGER

FLOAT

public static final DisplayDataTypeEnum FLOAT

DATE_TIME

public static final DisplayDataTypeEnum DATE_TIME
Method Detail

getValue

public String getValue()
The coded string value of the DisplayDataTypeEnum.


getDescrip

public String getDescrip()
A unique human-readable description of the DisplayDataTypeEnum.


getDisplayDataTypeEnum

public static DisplayDataTypeEnum getDisplayDataTypeEnum(String strValue)
                                                  throws DisplayDataTypeEnum.NoSuchDisplayDataTypeEnumException
Get a DisplayDataTypeEnum based on its coded string value.

Parameters:
strValue - The coded string value.
Throws:
DisplayDataTypeEnum.NoSuchDisplayDataTypeEnumException - when coded string value is invalid

toString

public String toString()
Returns a string representation of the DisplayDataTypeEnum. Useful for debugging.

Overrides:
toString in class Object

getAllDisplayDataTypeEnums

public static Collection getAllDisplayDataTypeEnums()
Returns a collection of all DisplayDataTypeEnums, sorted by coded string getValue() values.


compareTo

public int compareTo(Object arg0)
Compares other objects to this DisplayDataTypeEnum

Specified by:
compareTo in interface Comparable
Parameters:
arg0 - The object to compare with.
Returns:
1 if equal, 0 otherwise.