- All Implemented Interfaces:
ChoiceResult,PromptResult<ChoicePrompt>
Implementation of ChoiceResult.
-
Constructor Summary
ConstructorsConstructorDescriptionDefaultChoiceResult(String selectedId, ChoicePrompt prompt) Create a new DefaultChoiceResult with the given selected ID and item. -
Method Summary
Methods inherited from class org.jline.prompt.impl.AbstractPromptResult
applyFilter, getPrompt, getResultMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.jline.prompt.PromptResult
getDisplayResult, getPrompt, getResult
-
Constructor Details
-
DefaultChoiceResult
Create a new DefaultChoiceResult with the given selected ID and item.- Parameters:
selectedId- the ID of the selected itemitem- the associated PromptItem, or null if none
-
-
Method Details
-
getSelectedId
Description copied from interface:ChoiceResultGet the ID of the selected item.- Specified by:
getSelectedIdin interfaceChoiceResult- Returns:
- the ID of the selected item
-
getRawResult
Description copied from class:AbstractPromptResultGet the raw (unfiltered) result value. Subclasses must implement this instead ofAbstractPromptResult.getResult().- Specified by:
getRawResultin classAbstractPromptResult<ChoicePrompt>- Returns:
- the raw result value
-
toString
-