|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jcreme.enumerations.Enumeration
org.jcreme.enumerations.ComparatorType
This class defines an Enumeration of Comparators. This can be used to select comparators in Applications that need sorting. The class defines two basic comparatortype instances: NONE which holds a dummy comparator. DEFAULT which holds a dummy comparator for Comparable objects (it simply applies the Comparable's method).
Field Summary | |
static java.lang.Class |
C_DEFAULT
The Class to which the DEFAULT Comparator should be applied. |
static java.lang.Class |
C_NONE
The type for which the comparator in the NONE ComparatorType is applicable. |
static ComparatorType |
DEFAULT
The DEFAULT ComparatorType. |
static ComparatorType |
NONE
The NONE ComparatorType. |
static java.lang.String |
S_DEFAULT
The name of the DEFAULT ComparatorType. |
static java.lang.String |
S_NONE
The Name of the NONE ComparatorType. |
(package private) static long |
serialVersionUID
|
Constructor Summary | |
protected |
ComparatorType(java.lang.String name)
Creates a new instance of ComparatorType |
Method Summary | |
static ComparatorType |
get(java.lang.String name)
This method retrieves a ComparatorType from its name. |
java.util.Comparator |
getComparator()
Gives access to the Comparator of this ComparatorType. |
static ComparatorType[] |
getComparatorTypes()
This methods gives the instances of this class. |
static ComparatorType[] |
getComparatorTypes(java.lang.Class dataType)
Looks into the existing ComparatorTypes to find those that apply to a given type. |
java.lang.Class |
getDataType()
Gives access to the type that is associated to the ComparatorType. |
protected java.util.Hashtable |
getFromName()
This method is for internal use only. |
static Enumeration[] |
getValues()
This method enables to retrieve all the possible values of an Enumeration class. |
void |
setComparator(java.util.Comparator c)
Enables to set the Comparator for this ComparatorType. |
void |
setDataType(java.lang.Class type)
Enables to set the type that can be used with the associated ComparatorType. |
Methods inherited from class org.jcreme.enumerations.Enumeration |
compareTo, getName, readResolve, toString |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
static final long serialVersionUID
public static final java.lang.String S_NONE
public static final java.lang.Class C_NONE
public static final ComparatorType NONE
public static final java.lang.String S_DEFAULT
public static final java.lang.Class C_DEFAULT
public static final ComparatorType DEFAULT
Constructor Detail |
protected ComparatorType(java.lang.String name)
name
- the name of the enumerated value.Method Detail |
public void setDataType(java.lang.Class type)
type
- the type used by the associated ComparatorType.public java.lang.Class getDataType()
public void setComparator(java.util.Comparator c)
c
- the Comparator to use for this ComparatorType.public java.util.Comparator getComparator()
public static ComparatorType get(java.lang.String name)
name
- the name of the ComparatorType to find.
public static ComparatorType[] getComparatorTypes()
public static ComparatorType[] getComparatorTypes(java.lang.Class dataType)
dataType
- the type for which we look for ComparatorTypes.
public static Enumeration[] getValues()
protected java.util.Hashtable getFromName()
getFromName
in class Enumeration
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |