Class MenuItemComparator

  • All Implemented Interfaces:
    java.util.Comparator<MenuItem>

    public class MenuItemComparator
    extends java.lang.Object
    implements java.util.Comparator<MenuItem>
    Compare menu item first using their Order, then with their label in the specified (or default) language, and on last resort with their id.
    Since:
    jcms-10.0.0 - JCMS-5321
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      int compare​(MenuItem item1, MenuItem item2)  
      • 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
    • Constructor Detail

      • MenuItemComparator

        public MenuItemComparator()
      • MenuItemComparator

        public MenuItemComparator​(java.lang.String lang)
    • Method Detail

      • compare

        public int compare​(MenuItem item1,
                           MenuItem item2)
        Specified by:
        compare in interface java.util.Comparator<MenuItem>