tcMenuJavaAPI
Public Member Functions | List of all members
com.thecoderscorner.menu.domain.state.MenuState< T > Class Template Referenceabstract
Inheritance diagram for com.thecoderscorner.menu.domain.state.MenuState< T >:
com.thecoderscorner.menu.domain.state.AnyMenuState

Public Member Functions

 MenuState (StateStorageType storageType, MenuItem item, boolean changed, boolean active, T value)
 
MenuItem getItem ()
 
StateStorageType getStorageType ()
 
boolean isChanged ()
 
boolean isActive ()
 
getValue ()
 
boolean equals (Object o)
 
int hashCode ()
 

Detailed Description

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

Parameters
<T>the type of current value.

Constructor & Destructor Documentation

◆ MenuState()

com.thecoderscorner.menu.domain.state.MenuState< T >.MenuState ( StateStorageType  storageType,
MenuItem  item,
boolean  changed,
boolean  active,
value 
)

normally these states are created from the menu item, instead of directly

Parameters
changedif the item has changed
activeif the item is active.
valuethe current value

Member Function Documentation

◆ getItem()

Gets the menu item associated with this state.

Returns
the menu item

Implements com.thecoderscorner.menu.domain.state.AnyMenuState.

◆ getStorageType()

The storage type for this state, eg if it is a MenuState specialised for Integer, then the state type will be INTEGER.

Returns
the storage type

Implements com.thecoderscorner.menu.domain.state.AnyMenuState.

◆ getValue()

gets the current value

Returns
current value

Implements com.thecoderscorner.menu.domain.state.AnyMenuState.

◆ isActive()

gets the active status

Returns
active status

Implements com.thecoderscorner.menu.domain.state.AnyMenuState.

◆ isChanged()

gets the changed status

Returns
changed status

Implements com.thecoderscorner.menu.domain.state.AnyMenuState.


The documentation for this class was generated from the following file: