Public Member Functions | |
MenuState (StateStorageType storageType, MenuItem item, boolean changed, boolean active, T value) | |
MenuItem | getItem () |
StateStorageType | getStorageType () |
boolean | isChanged () |
boolean | isActive () |
T | getValue () |
boolean | equals (Object o) |
int | hashCode () |
The base class of menu state, stores the value, if it's active and changed. Generally it's best to work with state via com.thecoderscorner.menu.domain.util.MenuItemHelper
<T> | the type of current value. |
com.thecoderscorner.menu.domain.state.MenuState< T >.MenuState | ( | StateStorageType | storageType, |
MenuItem | item, | ||
boolean | changed, | ||
boolean | active, | ||
T | value | ||
) |
normally these states are created from the menu item, instead of directly
changed | if the item has changed |
active | if the item is active. |
value | the current value |
MenuItem com.thecoderscorner.menu.domain.state.MenuState< T >.getItem | ( | ) |
Gets the menu item associated with this state.
Implements com.thecoderscorner.menu.domain.state.AnyMenuState.
StateStorageType com.thecoderscorner.menu.domain.state.MenuState< T >.getStorageType | ( | ) |
The storage type for this state, eg if it is a MenuState specialised for Integer, then the state type will be INTEGER.
Implements com.thecoderscorner.menu.domain.state.AnyMenuState.
T com.thecoderscorner.menu.domain.state.MenuState< T >.getValue | ( | ) |
gets the current value
Implements com.thecoderscorner.menu.domain.state.AnyMenuState.
boolean com.thecoderscorner.menu.domain.state.MenuState< T >.isActive | ( | ) |
gets the active status
Implements com.thecoderscorner.menu.domain.state.AnyMenuState.
boolean com.thecoderscorner.menu.domain.state.MenuState< T >.isChanged | ( | ) |
gets the changed status
Implements com.thecoderscorner.menu.domain.state.AnyMenuState.