Class FixedMenuOrderComparator
java.lang.Object
com.foreach.across.modules.web.menu.FixedMenuOrderComparator
- All Implemented Interfaces:
Comparator<Menu>
Registers a fixed order to menu paths that are equal.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionint
void
put
(MenuMatcher matcher, int order) void
setDefaultOrder
(Integer defaultOrder) Setting the default order to null will ensure that the order property of the menu is being used.void
setFallbackComparator
(Comparator<Menu> fallbackComparator) Set the comparator that will be used in case the fixed order is the same.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 Details
-
FixedMenuOrderComparator
public FixedMenuOrderComparator()
-
-
Method Details
-
getDefaultOrder
-
setDefaultOrder
Setting the default order to null will ensure that the order property of the menu is being used.- Parameters:
defaultOrder
- Default order to use if no fixed order set.
-
getFallbackComparator
-
setFallbackComparator
Set the comparator that will be used in case the fixed order is the same.- Parameters:
fallbackComparator
- Comparator instance.