MenuItemTextComparator (jEdit API Documentation)
Date: 2015-10-20

org.gjt.sp.jedit.menu

## Class MenuItemTextComparator

- java.lang.Object
- - org.gjt.sp.jedit.menu.MenuItemTextComparator

- All Implemented Interfaces:
    java.util.Comparator<javax.swing.JMenuItem>

      public class MenuItemTextComparator
      extends java.lang.Object
      implements java.util.Comparator<javax.swing.JMenuItem>

  MenuItemTextComparator implements java.util.Comparator, and compares the text value of JMenuItems using the case-insensitive smart comparison of StandardUtilities.compareStrings. If one of the JMenuItems is an EnhancedMenuItem it is given a higher comparison value.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `MenuItemTextComparator()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `int` | `compare(javax.swing.JMenuItem obj1, javax.swing.JMenuItem obj2)`

    - ### 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

      `comparing, comparing, comparingDouble, comparingInt, comparingLong, equals, naturalOrder, nullsFirst, nullsLast, reversed, reverseOrder, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLong`

- - ### Constructor Detail

    - #### MenuItemTextComparator

          public MenuItemTextComparator()

  - ### Method Detail

    - #### compare

          public int compare(javax.swing.JMenuItem obj1,
                             javax.swing.JMenuItem obj2)

      Specified by:
        `compare` in interface `java.util.Comparator<javax.swing.JMenuItem>`