- java.lang.Object
-
- com.thecoderscorner.menu.domain.MenuItem<java.lang.Boolean>
-
- com.thecoderscorner.menu.domain.SubMenuItem
-
public class SubMenuItem extends MenuItem<java.lang.Boolean>
SubMenuItem represents a menu item that has children. To get the child items call the MenuTree methods that interact with items.
-
-
Field Summary
-
Fields inherited from class com.thecoderscorner.menu.domain.MenuItem
eepromAddress, functionName, id, name, readOnly
-
-
Constructor Summary
Constructors Constructor Description SubMenuItem()SubMenuItem(java.lang.String name, int id, int eepromAddr)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaccept(MenuItemVisitor visitor)booleanequals(java.lang.Object o)booleanhasChildren()SubMenuItems always have child items, so they always return trueinthashCode()MenuState<java.lang.Boolean>newMenuState(java.lang.Boolean value, boolean changed, boolean active)-
Methods inherited from class com.thecoderscorner.menu.domain.MenuItem
getEepromAddress, getFunctionName, getId, getName, isReadOnly, toString
-
-
-
-
Method Detail
-
hasChildren
public boolean hasChildren()
SubMenuItems always have child items, so they always return true- Overrides:
hasChildrenin classMenuItem<java.lang.Boolean>- Returns:
-
newMenuState
public MenuState<java.lang.Boolean> newMenuState(java.lang.Boolean value, boolean changed, boolean active)
- Specified by:
newMenuStatein classMenuItem<java.lang.Boolean>
-
accept
public void accept(MenuItemVisitor visitor)
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
-