Class DefaultInputResult

    • Constructor Detail

      • DefaultInputResult

        public DefaultInputResult​(java.lang.String input,
                                  java.lang.String displayInput,
                                  InputPrompt prompt)
        Create a new DefaultInputResult with the given input, display input, and item.
        Parameters:
        input - the input text
        displayInput - the display input text (e.g., masked for passwords)
        item - the associated PromptItem, or null if none
    • Method Detail

      • getInput

        public java.lang.String getInput()
        Description copied from interface: InputResult
        Get the input text.
        Specified by:
        getInput in interface InputResult
        Returns:
        the input text
      • getDisplayResult

        public java.lang.String getDisplayResult()
        Description copied from interface: PromptResult
        Get a human-readable display representation of the result.

        This method returns a formatted version of the result that is suitable for display to users. It may differ from PromptResult.getResult() by providing more descriptive text or better formatting.

        The default implementation returns the same value as PromptResult.getResult(). Specific result types may override this to provide more user-friendly formatting.

        Specified by:
        getDisplayResult in interface PromptResult<InputPrompt>
        Returns:
        a display-friendly representation of the result, never null
      • toString

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