java.lang.Object
com.thecoderscorner.menu.domain.state.ListResponse

public class ListResponse extends Object
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.
  • Field Details

  • Constructor Details

  • Method Details

    • getRow

      public int getRow()
      Returns:
      the row that was selected
    • getResponseType

      public ListResponse.ResponseType getResponseType()
      Returns:
      the action that was performed
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • fromString

      public static Optional<ListResponse> fromString(String value)
      Deserialize a ListResponse from a string if possible or return empty
      Parameters:
      value - the string to decode
      Returns:
      either a ListResponse or empty.