Enum Comparator
- All Implemented Interfaces:
Serializable
,Comparable<Comparator>
Utility for selecting a way to compare two strings.
-
Enum Constant Summary
-
Method Summary
Modifier and TypeMethodDescriptionabstract boolean
Compare the two stringsabstract boolean
Compare the two stringsstatic Comparator
get
(String name, Comparator defaultValue) org.jvnet.localizer.Localizable
static ListBoxModel
getSelectOptions
(boolean emptySelection, Comparator top) static Comparator
Returns the enum constant of this type with the specified name.static Comparator[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
Enum Constant Details
-
GLOB
ANT style "glob" pattern. -
REGEXP
Regular expression -
EQUALS
String equals
-
-
Method Details
-
values
Returns an array containing the constants of this enum type, in the order they are declared.- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
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:
IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is null
-
getDisplayName
public org.jvnet.localizer.Localizable getDisplayName() -
compare
Compare the two strings- Parameters:
pattern
- the pattern/value to check foractual
- the value to checkcaseSensitive
- whether the comparison will be case-sensitive. Only for the GLOB comparator- Returns:
- true if matching
-
compare
Compare the two strings- Parameters:
pattern
- the pattern/value to check foractual
- the value to check- Returns:
- true if matching
-
get
-
getSelectOptions
-