- All Implemented Interfaces:
ListResult,PromptResult<ListPrompt>
Implementation of ListResult.
-
Constructor Summary
ConstructorsConstructorDescriptionDefaultListResult(String selectedId, ListPrompt prompt) Create a new DefaultListResult with the given selected ID and prompt. -
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
-
DefaultListResult
Create a new DefaultListResult with the given selected ID and prompt.- Parameters:
selectedId- the ID of the selected itemprompt- the associated ListPrompt, or null if none
-
-
Method Details
-
getSelectedId
Description copied from interface:ListResultGet the ID of the selected item.- Specified by:
getSelectedIdin interfaceListResult- 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<ListPrompt>- Returns:
- the raw result value
-
toString
-