- java.lang.Object
-
- org.jline.prompt.impl.AbstractPromptResult<ListPrompt>
-
- org.jline.prompt.impl.DefaultListResult
-
- All Implemented Interfaces:
ListResult,PromptResult<ListPrompt>
public class DefaultListResult extends AbstractPromptResult<ListPrompt> implements ListResult
Implementation of ListResult.
-
-
Constructor Summary
Constructors Constructor Description DefaultListResult(java.lang.String selectedId, ListPrompt prompt)Create a new DefaultListResult with the given selected ID and prompt.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected java.lang.StringgetRawResult()Get the raw (unfiltered) result value.java.lang.StringgetSelectedId()Get the ID of the selected item.java.lang.StringtoString()-
Methods inherited from class org.jline.prompt.impl.AbstractPromptResult
applyFilter, getPrompt, getResult
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.jline.prompt.PromptResult
getDisplayResult, getPrompt, getResult
-
-
-
-
Constructor Detail
-
DefaultListResult
public DefaultListResult(java.lang.String selectedId, ListPrompt prompt)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 Detail
-
getSelectedId
public java.lang.String getSelectedId()
Description copied from interface:ListResultGet the ID of the selected item.- Specified by:
getSelectedIdin interfaceListResult- Returns:
- the ID of the selected item
-
getRawResult
protected java.lang.String 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
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-