Class MenuState<T>
- java.lang.Object
-
- com.thecoderscorner.menu.domain.state.MenuState<T>
-
- Type Parameters:
T- the type of current value.
- Direct Known Subclasses:
BigDecimalMenuState,BooleanMenuState,FloatMenuState,IntegerMenuState,StringListMenuState,StringMenuState
public abstract class MenuState<T> extends java.lang.ObjectThe base class of menu state, stores the value, if it's active and changed.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(java.lang.Object o)MenuItem<T>getItem()Gets the menu item associated with this state.TgetValue()gets the current valueinthashCode()booleanisActive()gets the active statusbooleanisChanged()gets the changed status
-
-
-
Method Detail
-
getItem
public MenuItem<T> getItem()
Gets the menu item associated with this state.- Returns:
- the menu item
-
isChanged
public boolean isChanged()
gets the changed status- Returns:
- changed status
-
isActive
public boolean isActive()
gets the active status- Returns:
- active status
-
getValue
public T getValue()
gets the current value- Returns:
- current value
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
-