- All Implemented Interfaces:
InputResult,PromptResult<InputPrompt>
Implementation of InputResult.
-
Constructor Summary
ConstructorsConstructorDescriptionDefaultInputResult(String input, String displayInput, InputPrompt prompt) Create a new DefaultInputResult with the given input, display input, and item. -
Method Summary
Methods inherited from class org.jline.prompt.impl.AbstractPromptResult
applyFilter, getPrompt, getResultMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.jline.prompt.PromptResult
getPrompt, getResult
-
Constructor Details
-
DefaultInputResult
Create a new DefaultInputResult with the given input, display input, and item.- Parameters:
input- the input textdisplayInput- the display input text (e.g., masked for passwords)item- the associated PromptItem, or null if none
-
-
Method Details
-
getInput
Description copied from interface:InputResultGet the input text.- Specified by:
getInputin interfaceInputResult- Returns:
- the input text
-
getRawResult
Description copied from class:AbstractPromptResultGet the raw (unfiltered) result value. Subclasses must implement this instead ofAbstractPromptResult.getResult().- Specified by:
getRawResultin classAbstractPromptResult<InputPrompt>- Returns:
- the raw result value
-
getDisplayResult
Description copied from interface:PromptResultGet 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:
getDisplayResultin interfacePromptResult<InputPrompt>- Returns:
- a display-friendly representation of the result, never
null
-
toString
-