Class LanguageComparator

  • All Implemented Interfaces:
    java.util.Comparator<org.languagetool.Language>

    class LanguageComparator
    extends java.lang.Object
    implements java.util.Comparator<org.languagetool.Language>
    Comparator class for sorting Language by locale name
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private java.lang.String extLangSuffix  
      private java.util.ResourceBundle messages  
    • Constructor Summary

      Constructors 
      Constructor Description
      LanguageComparator​(java.util.ResourceBundle messages, java.lang.String extLangSuffix)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      int compare​(org.languagetool.Language o1, org.languagetool.Language o2)  
      private java.lang.String getTranslatedName​(org.languagetool.Language language)  
      • Methods inherited from class java.lang.Object

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

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

      • messages

        private final java.util.ResourceBundle messages
      • extLangSuffix

        private final java.lang.String extLangSuffix
    • Constructor Detail

      • LanguageComparator

        LanguageComparator​(java.util.ResourceBundle messages,
                           java.lang.String extLangSuffix)
    • Method Detail

      • compare

        public int compare​(org.languagetool.Language o1,
                           org.languagetool.Language o2)
        Specified by:
        compare in interface java.util.Comparator<org.languagetool.Language>
      • getTranslatedName

        private java.lang.String getTranslatedName​(org.languagetool.Language language)