Class ListResponse
java.lang.Object
com.thecoderscorner.menu.domain.state.ListResponse
This represents an action that was performed on a list, and not really the state of the list. For example, when
the user clicks on the list, or double-clicks. It holds the row that was selected and the action type.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumThe types of response that are supported, current select - single click, invoke - double click. -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic Optional<ListResponse>fromString(String value) Deserialize a ListResponse from a string if possible or return emptyintgetRow()toString()
-
Field Details
-
EMPTY
-
-
Constructor Details
-
Method Details
-
getRow
public int getRow()- Returns:
- the row that was selected
-
getResponseType
- Returns:
- the action that was performed
-
toString
-
fromString
Deserialize a ListResponse from a string if possible or return empty- Parameters:
value- the string to decode- Returns:
- either a ListResponse or empty.
-