- java.lang.Object
-
- org.jline.prompt.impl.AbstractPromptResult<KeyPressPrompt>
-
- org.jline.prompt.impl.DefaultKeyPressResult
-
- All Implemented Interfaces:
KeyPressResult,PromptResult<KeyPressPrompt>
public class DefaultKeyPressResult extends AbstractPromptResult<KeyPressPrompt> implements KeyPressResult
Implementation of KeyPressResult.
-
-
Constructor Summary
Constructors Constructor Description DefaultKeyPressResult(java.lang.String key, KeyPressPrompt prompt)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.StringgetKey()Get the key that was pressed.protected java.lang.StringgetRawResult()Get the raw (unfiltered) result value.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
-
DefaultKeyPressResult
public DefaultKeyPressResult(java.lang.String key, KeyPressPrompt prompt)
-
-
Method Detail
-
getKey
public java.lang.String getKey()
Description copied from interface:KeyPressResultGet the key that was pressed.- Specified by:
getKeyin interfaceKeyPressResult- Returns:
- the pressed key as a string
-
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<KeyPressPrompt>- Returns:
- the raw result value
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-