- java.lang.Object
-
- org.jline.prompt.impl.AbstractPromptResult<CheckboxPrompt>
-
- org.jline.prompt.impl.DefaultCheckboxResult
-
- All Implemented Interfaces:
CheckboxResult,PromptResult<CheckboxPrompt>
public class DefaultCheckboxResult extends AbstractPromptResult<CheckboxPrompt> implements CheckboxResult
Implementation of CheckboxResult.
-
-
Constructor Summary
Constructors Constructor Description DefaultCheckboxResult(java.util.Set<java.lang.String> selectedIds, CheckboxPrompt prompt)Create a new DefaultCheckboxResult with the given selected IDs and item.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected java.lang.StringgetRawResult()Get the raw (unfiltered) result value.java.util.Set<java.lang.String>getSelectedIds()Get the IDs of the selected items.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
-
DefaultCheckboxResult
public DefaultCheckboxResult(java.util.Set<java.lang.String> selectedIds, CheckboxPrompt prompt)Create a new DefaultCheckboxResult with the given selected IDs and item.- Parameters:
selectedIds- the IDs of the selected itemsitem- the associated PromptItem, or null if none
-
-
Method Detail
-
getSelectedIds
public java.util.Set<java.lang.String> getSelectedIds()
Description copied from interface:CheckboxResultGet the IDs of the selected items.- Specified by:
getSelectedIdsin interfaceCheckboxResult- Returns:
- the IDs of the selected items
-
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<CheckboxPrompt>- Returns:
- the raw result value
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-