java.lang.Cloneable
, Prompt
public abstract class RegexPrompt extends ValidatingPrompt
END_OF_CONVERSATION
Constructor | Description |
---|---|
RegexPrompt(java.lang.String regex) |
|
RegexPrompt(java.util.regex.Pattern pattern) |
Modifier and Type | Method | Description |
---|---|---|
protected boolean |
isInputValid(ConversationContext context,
java.lang.String input) |
Override this method to check the validity of the player's input.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getPromptText
acceptInput, acceptValidatedInput, blocksForInput, getFailedValidationText
public RegexPrompt(java.lang.String regex)
public RegexPrompt(java.util.regex.Pattern pattern)
protected boolean isInputValid(ConversationContext context, java.lang.String input)
ValidatingPrompt
isInputValid
in class ValidatingPrompt
context
- Context information about the conversation.input
- The player's raw console input.Copyright © 2018. All rights reserved.