Class CurrentScrollPosition
java.lang.Object
com.thecoderscorner.menu.domain.state.CurrentScrollPosition
Represents a scroll position as used by ScrollChoiceMenuItems, it holds the position and the current string value.
-
Constructor Summary
ConstructorsConstructorDescriptionCurrentScrollPosition(int position, String value) Create from the position and valueCurrentScrollPosition(String text) Create from a textual representation in the form, position-value, EG 1-Pizza -
Method Summary
Modifier and TypeMethodDescriptionbooleanintgetValue()inthashCode()voidsetTextValue(Object txt) Allows the value to be changed just after creation, this is for local UIs where the setting happens just after creation of the state.toString()
-
Constructor Details
-
CurrentScrollPosition
Create from the position and value- Parameters:
position- the current positionvalue- the current value
-
CurrentScrollPosition
Create from a textual representation in the form, position-value, EG 1-Pizza- Parameters:
text- the text form of the object to parse
-
-
Method Details
-
getPosition
public int getPosition()- Returns:
- the current position
-
getValue
- Returns:
- the current value
-
toString
-
equals
-
hashCode
public int hashCode() -
setTextValue
Allows the value to be changed just after creation, this is for local UIs where the setting happens just after creation of the state.- Parameters:
txt- the new value
-