tcMenuJavaAPI
Classes | Public Member Functions | Static Public Member Functions | Static Public Attributes | List of all members
com.thecoderscorner.menu.domain.state.ListResponse Class Reference

Classes

enum  ResponseType
 

Public Member Functions

 ListResponse (int row, ResponseType responseType)
 
int getRow ()
 
ResponseType getResponseType ()
 
String toString ()
 

Static Public Member Functions

static Optional< ListResponsefromString (String value)
 

Static Public Attributes

static final ListResponse EMPTY = new ListResponse(0, ResponseType.SELECT_ITEM)
 

Detailed Description

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.


Class Documentation

◆ com::thecoderscorner::menu::domain::state::ListResponse::ResponseType

enum com::thecoderscorner::menu::domain::state::ListResponse::ResponseType

The types of response that are supported, current select - single click, invoke - double click.

Enumerator
INVOKE_ITEM
SELECT_ITEM

Member Function Documentation

◆ fromString()

static Optional<ListResponse> com.thecoderscorner.menu.domain.state.ListResponse.fromString ( String  value)
static

Deserialize a ListResponse from a string if possible or return empty

Parameters
valuethe string to decode
Returns
either a ListResponse or empty.

◆ getResponseType()

ResponseType com.thecoderscorner.menu.domain.state.ListResponse.getResponseType ( )
Returns
the action that was performed

◆ getRow()

int com.thecoderscorner.menu.domain.state.ListResponse.getRow ( )
Returns
the row that was selected

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