Class DefaultChoiceItem

  • All Implemented Interfaces:
    ChoiceItem, PromptItem

    public class DefaultChoiceItem
    extends java.lang.Object
    implements ChoiceItem
    Default implementation of ChoiceItem interface.
    • Constructor Summary

      Constructors 
      Constructor Description
      DefaultChoiceItem​(java.lang.String name, java.lang.String text, char key)  
      DefaultChoiceItem​(java.lang.String name, java.lang.String text, char key, java.lang.String helpText, boolean defaultChoice)  
    • Constructor Detail

      • DefaultChoiceItem

        public DefaultChoiceItem​(java.lang.String name,
                                 java.lang.String text,
                                 char key,
                                 java.lang.String helpText,
                                 boolean defaultChoice)
      • DefaultChoiceItem

        public DefaultChoiceItem​(java.lang.String name,
                                 java.lang.String text,
                                 char key)
    • Method Detail

      • getName

        public java.lang.String getName()
        Description copied from interface: PromptItem
        Get the name of this item.
        Specified by:
        getName in interface PromptItem
        Returns:
        the name
      • getText

        public java.lang.String getText()
        Description copied from interface: PromptItem
        Get the text to display for this item.
        Specified by:
        getText in interface PromptItem
        Returns:
        the text
      • getKey

        public java.lang.Character getKey()
        Description copied from interface: ChoiceItem
        Get the key associated with this choice.
        Specified by:
        getKey in interface ChoiceItem
        Returns:
        the key
      • getHelpText

        public java.lang.String getHelpText()
      • isDefaultChoice

        public boolean isDefaultChoice()
        Description copied from interface: ChoiceItem
        Whether this choice is the default choice.
        Specified by:
        isDefaultChoice in interface ChoiceItem
        Returns:
        true if this choice is the default
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object