java.lang.Object
org.jline.prompt.impl.DefaultChoiceItem
- All Implemented Interfaces:
ChoiceItem,PromptItem
Default implementation of ChoiceItem interface.
-
Constructor Summary
ConstructorsConstructorDescriptionDefaultChoiceItem(String name, String text, char key) DefaultChoiceItem(String name, String text, char key, String helpText, boolean defaultChoice) -
Method Summary
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.jline.prompt.PromptItem
getDisabledText, getFooter, isDisabled, isSelectable
-
Constructor Details
-
DefaultChoiceItem
-
DefaultChoiceItem
-
-
Method Details
-
getName
Description copied from interface:PromptItemGet the name of this item.- Specified by:
getNamein interfacePromptItem- Returns:
- the name
-
getText
Description copied from interface:PromptItemGet the text to display for this item.- Specified by:
getTextin interfacePromptItem- Returns:
- the text
-
getKey
Description copied from interface:ChoiceItemGet the key associated with this choice.- Specified by:
getKeyin interfaceChoiceItem- Returns:
- the key
-
getHelpText
-
isDefaultChoice
public boolean isDefaultChoice()Description copied from interface:ChoiceItemWhether this choice is the default choice.- Specified by:
isDefaultChoicein interfaceChoiceItem- Returns:
- true if this choice is the default
-
toString
-