Package com.jalios.jcms.comparator
Enum BasicComparator.StringComparisonMethod
- java.lang.Object
-
- java.lang.Enum<BasicComparator.StringComparisonMethod>
-
- com.jalios.jcms.comparator.BasicComparator.StringComparisonMethod
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Comparable<BasicComparator.StringComparisonMethod>
- Enclosing class:
- BasicComparator<T extends Storable>
public static enum BasicComparator.StringComparisonMethod extends java.lang.Enum<BasicComparator.StringComparisonMethod>
Possible implementation of String comparison.Default value can be specified using property
comparator-string.comparison-method
.
For examplecomparator-string.comparison-method: UnaccentuateStringIgnoreCase
Or per Comparator class using propertycomparator-string.comparison-method.{comparator-classname}
.
For examplecomparator-string.comparison-method.com.jalios.jcms.Member$NameComparator: IcuCollationKey
- Since:
- jcms-10.0.4 / JCMS-8000
-
-
Enum Constant Summary
Enum Constants Enum Constant Description CollationKey
UsesCollationKey.compareTo(CollationKey)
(instanciated and cached for each value, with current locale).Collator
UsesCollator.compare(String, String)
(with current locale)IcuCollationKey
Uses ICU4JCollationKey.compareTo(com.ibm.icu.text.CollationKey)
(instanciated and cached for each value, with current locale).IcuCollator
Uses ICU4JCollator.compare(String, String)
(with current locale).StringIgnoreCase
UsesString.compareToIgnoreCase(String)
UnaccentuateStringIgnoreCase
UsesUtil.unaccentuate(String)
andString.compareToIgnoreCase(String)
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static BasicComparator.StringComparisonMethod
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.static BasicComparator.StringComparisonMethod[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
StringIgnoreCase
public static final BasicComparator.StringComparisonMethod StringIgnoreCase
UsesString.compareToIgnoreCase(String)
-
UnaccentuateStringIgnoreCase
public static final BasicComparator.StringComparisonMethod UnaccentuateStringIgnoreCase
UsesUtil.unaccentuate(String)
andString.compareToIgnoreCase(String)
-
Collator
public static final BasicComparator.StringComparisonMethod Collator
UsesCollator.compare(String, String)
(with current locale)
-
CollationKey
public static final BasicComparator.StringComparisonMethod CollationKey
UsesCollationKey.compareTo(CollationKey)
(instanciated and cached for each value, with current locale).
-
IcuCollator
public static final BasicComparator.StringComparisonMethod IcuCollator
Uses ICU4JCollator.compare(String, String)
(with current locale).This comparison method supports an additional configuration to specify the ICU4j collation keyword to be used in the corresponding ICU4J Locale.
Default value can be specified using propertycomparator-string.icu-collator.collation
.
For examplecomparator-string.icu-collator.collation: phonebook
Or per Comparator class using propertycomparator-string.icu-collator.collation.{comparator-classname}
.
For examplecomparator-string.icu-collator.collation.com.jalios.jcms.Member$NameComparator: phonebook
-
IcuCollationKey
public static final BasicComparator.StringComparisonMethod IcuCollationKey
Uses ICU4JCollationKey.compareTo(com.ibm.icu.text.CollationKey)
(instanciated and cached for each value, with current locale).Supports same configuration as
IcuCollator
.
-
-
Method Detail
-
values
public static BasicComparator.StringComparisonMethod[] 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 (BasicComparator.StringComparisonMethod c : BasicComparator.StringComparisonMethod.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static BasicComparator.StringComparisonMethod 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 namejava.lang.NullPointerException
- if the argument is null
-
-