com.buck.commons.text
Enum TextComparatorFactory.Kind

java.lang.Object
  extended by java.lang.Enum<TextComparatorFactory.Kind>
      extended by com.buck.commons.text.TextComparatorFactory.Kind
All Implemented Interfaces:
Serializable, Comparable<TextComparatorFactory.Kind>
Enclosing class:
TextComparatorFactory

public static enum TextComparatorFactory.Kind
extends Enum<TextComparatorFactory.Kind>

Distinguishes the kind of comparator.


Enum Constant Summary
NATURAL
          A comparator able to sort decimal numbers and ordinary text.
NATURAL_ENHANCED
          A Comparator able to sort real numbers, version numbers, decimal numbers, as well as ordinary text.
STRICT
          A comparator that strictly orders text using an ordinary string comparison, case sensitively.
STRICT_COLLATION
          A comparator that strictly orders text in a locale sensitive manner.
 
Method Summary
static TextComparatorFactory.Kind valueOf(String name)
          Returns the enum constant of this type with the specified name.
static TextComparatorFactory.Kind[] values()
          Returns an array containing the constants of this enum type, in the order they are declared.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

STRICT

public static final TextComparatorFactory.Kind STRICT
A comparator that strictly orders text using an ordinary string comparison, case sensitively. This should only be used for latin text.


STRICT_COLLATION

public static final TextComparatorFactory.Kind STRICT_COLLATION
A comparator that strictly orders text in a locale sensitive manner.


NATURAL

public static final TextComparatorFactory.Kind NATURAL
A comparator able to sort decimal numbers and ordinary text.


NATURAL_ENHANCED

public static final TextComparatorFactory.Kind NATURAL_ENHANCED
A Comparator able to sort real numbers, version numbers, decimal numbers, as well as ordinary text.

Method Detail

values

public static TextComparatorFactory.Kind[] 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 (TextComparatorFactory.Kind c : TextComparatorFactory.Kind.values())
    System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they are declared

valueOf

public static TextComparatorFactory.Kind valueOf(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:
IllegalArgumentException - if this enum type has no constant with the specified name
NullPointerException - if the argument is null


Copyright © 2013. All Rights Reserved.