Enum CollationStrength

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Comparable<CollationStrength>

    public enum CollationStrength
    extends java.lang.Enum<CollationStrength>
    Collation support allows the specific configuration of how differences between characters are handled.
    Since:
    3.4
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
      IDENTICAL
      When all other levels are equal, the identical level is used as a tiebreaker.
      PRIMARY
      Strongest level, denote difference between base characters
      QUATERNARY
      When punctuation is ignored at level 1-3, an additional level can be used to distinguish words with and without punctuation.
      SECONDARY
      Accents in characters are considered secondary differences
      TERTIARY
      Upper and lower case differences in characters are distinguished at the tertiary level.
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      static CollationStrength fromInt​(int intRepresentation)
      Gets the order from the given integer representation.
      int getIntRepresentation()
      The integer representation of the collation strength.
      static CollationStrength valueOf​(java.lang.String name)
      Returns the enum constant of this type with the specified name.
      static CollationStrength[] values()
      Returns an array containing the constants of this enum type, in the order they are declared.
      • Methods inherited from class java.lang.Enum

        compareTo, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
      • Methods inherited from class java.lang.Object

        getClass, notify, notifyAll, wait, wait, wait
    • Enum Constant Detail

      • PRIMARY

        public static final CollationStrength PRIMARY
        Strongest level, denote difference between base characters
      • SECONDARY

        public static final CollationStrength SECONDARY
        Accents in characters are considered secondary differences
      • TERTIARY

        public static final CollationStrength TERTIARY
        Upper and lower case differences in characters are distinguished at the tertiary level. The server default.
      • QUATERNARY

        public static final CollationStrength QUATERNARY
        When punctuation is ignored at level 1-3, an additional level can be used to distinguish words with and without punctuation.
      • IDENTICAL

        public static final CollationStrength IDENTICAL
        When all other levels are equal, the identical level is used as a tiebreaker. The Unicode code point values of the NFD form of each string are compared at this level, just in case there is no difference at levels 1-4
    • Method Detail

      • values

        public static CollationStrength[] 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 (CollationStrength c : CollationStrength.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static CollationStrength 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 name
        java.lang.NullPointerException - if the argument is null
      • getIntRepresentation

        public int getIntRepresentation()
        The integer representation of the collation strength.
        Returns:
        the integer representation
      • fromInt

        public static CollationStrength fromInt​(int intRepresentation)
        Gets the order from the given integer representation.
        Parameters:
        intRepresentation - the integer representation
        Returns:
        the order