Class CollatorICU

  • All Implemented Interfaces:
    java.lang.Cloneable, java.util.Comparator<java.lang.Object>

    public class CollatorICU
    extends java.text.Collator
    CollatorICU is an adapter class which wraps ICU4J Collator and implements java.text.Collator APIs.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private Collator fIcuCollator  
      • Fields inherited from class java.text.Collator

        CANONICAL_DECOMPOSITION, FULL_DECOMPOSITION, IDENTICAL, NO_DECOMPOSITION, PRIMARY, SECONDARY, TERTIARY
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      private CollatorICU​(Collator icuCollator)  
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.Object clone()  
      int compare​(java.lang.Object o1, java.lang.Object o2)  
      int compare​(java.lang.String source, java.lang.String target)  
      boolean equals​(java.lang.Object that)  
      boolean equals​(java.lang.String source, java.lang.String target)  
      java.text.CollationKey getCollationKey​(java.lang.String source)  
      int getDecomposition()  
      int getStrength()  
      int hashCode()  
      void setDecomposition​(int decompositionMode)  
      void setStrength​(int newStrength)  
      Collator unwrap()  
      static java.text.Collator wrap​(Collator icuCollator)  
      • Methods inherited from class java.text.Collator

        getAvailableLocales, getInstance, getInstance
      • Methods inherited from class java.lang.Object

        finalize, getClass, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface java.util.Comparator

        reversed, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLong
    • Field Detail

      • fIcuCollator

        private Collator fIcuCollator
    • Constructor Detail

      • CollatorICU

        private CollatorICU​(Collator icuCollator)
    • Method Detail

      • wrap

        public static java.text.Collator wrap​(Collator icuCollator)
      • clone

        public java.lang.Object clone()
        Overrides:
        clone in class java.text.Collator
      • compare

        public int compare​(java.lang.Object o1,
                           java.lang.Object o2)
        Specified by:
        compare in interface java.util.Comparator<java.lang.Object>
        Overrides:
        compare in class java.text.Collator
      • compare

        public int compare​(java.lang.String source,
                           java.lang.String target)
        Specified by:
        compare in class java.text.Collator
      • equals

        public boolean equals​(java.lang.Object that)
        Specified by:
        equals in interface java.util.Comparator<java.lang.Object>
        Overrides:
        equals in class java.text.Collator
      • equals

        public boolean equals​(java.lang.String source,
                              java.lang.String target)
        Overrides:
        equals in class java.text.Collator
      • getCollationKey

        public java.text.CollationKey getCollationKey​(java.lang.String source)
        Specified by:
        getCollationKey in class java.text.Collator
      • getDecomposition

        public int getDecomposition()
        Overrides:
        getDecomposition in class java.text.Collator
      • getStrength

        public int getStrength()
        Overrides:
        getStrength in class java.text.Collator
      • hashCode

        public int hashCode()
        Specified by:
        hashCode in class java.text.Collator
      • setDecomposition

        public void setDecomposition​(int decompositionMode)
        Overrides:
        setDecomposition in class java.text.Collator
      • setStrength

        public void setStrength​(int newStrength)
        Overrides:
        setStrength in class java.text.Collator