Class AbstractMenuItemVisitor<T>
java.lang.Object
com.thecoderscorner.menu.domain.util.AbstractMenuItemVisitor<T>
- Type Parameters:
T-
- All Implemented Interfaces:
MenuItemVisitor
Abstract version of the interface MenuItemVisitor, it implements all the methods by defaulting the behaviour to
the anyItem() method. You must implement at least the anyItem method as by default it throws an exception.
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidWhenever a visit method is not implemented, then anyItem is called instead.Returns the result previously stored by set result.protected voidStores the result within a visit call, normally used with visitWithResultvoidvisit(ActionMenuItem item) This will be called during visit for an action itemvoidvisit(AnalogMenuItem item) This will be called during visit for an analog itemvoidvisit(BooleanMenuItem item) This will be called during visit for a boolean itemvoidvisit(CustomBuilderMenuItem customItem) This will be called during visit for a custom menu itemvoidvisit(EditableLargeNumberMenuItem numItem) This will be called during visit for a large number itemvoidvisit(EditableTextMenuItem item) This will be called during visit for a text itemvoidvisit(EnumMenuItem item) This will be called during visit for an enumeration itemvoidvisit(FloatMenuItem item) This will be called during visit for an floating point itemvoidvisit(Rgb32MenuItem rgbItem) This will be called during visit for RGB itemsvoidvisit(RuntimeListMenuItem listItem) this will be called during visit for a list itemvoidvisit(ScrollChoiceMenuItem scrollItem) This will be called during visit for scroll choice itemsvoidvisit(SubMenuItem item) This will be called during visit for sub menu
-
Constructor Details
-
AbstractMenuItemVisitor
public AbstractMenuItemVisitor()
-
-
Method Details
-
getResult
Returns the result previously stored by set result.- Returns:
- the result or empty if not set.
- See Also:
-
setResult
Stores the result within a visit call, normally used with visitWithResult- Parameters:
res- the result to store- See Also: