Class QMenuItemMatcher
java.lang.Object
com.kingsrook.qqq.backend.core.model.metadata.menus.adjusters.QMenuItemMatcher
Utility class for matching menu items based on various criteria.
This class provides a flexible way to identify menu items within a menu structure. It supports matching by:
- Exact item instance equality
- Built-in option type (for QMenuItemBuiltIn items)
- Item class type
- Label text using filter criteria operators
Used primarily by QMenuAdjuster to locate items for modification
or removal operations.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionQMenuItemMatcher(QCriteriaOperator operator, String labelValue) Constructor that matches items by label text using a filter criteria operator.QMenuItemMatcher(QMenuItemBuiltIn.BuiltInOptionInterface builtInOption) Constructor that matches built-in menu items by their option type.Constructor that matches items by exact instance equality.QMenuItemMatcher(Class<? extends QMenuItemInterface> menuItemClass) Constructor that matches items by their class type.QMenuItemMatcher(String labelValue) Constructor that matches items by label (doing an EQUALS match) -
Method Summary
Modifier and TypeMethodDescriptionbooleanDetermines whether the given menu item matches this matcher's criteria.
-
Constructor Details
-
QMenuItemMatcher
Constructor that matches items by their class type.- Parameters:
menuItemClass- the class type to match (e.g., QMenuItemDivider.class)
-
QMenuItemMatcher
Constructor that matches items by label (doing an EQUALS match)- Parameters:
labelValue- the label value to match against
-
QMenuItemMatcher
Constructor that matches items by label text using a filter criteria operator.- Parameters:
operator- the comparison operator (e.g., EQUALS, CONTAINS)labelValue- the label value to match against
-
Method Details