public abstract class BooleanPrompt extends ValidatingPrompt
END_OF_CONVERSATION| 构造器和说明 |
|---|
BooleanPrompt() |
| 限定符和类型 | 方法和说明 |
|---|---|
protected abstract Prompt |
acceptValidatedInput(ConversationContext context,
boolean input)
您可以重写这个方法,根据用户对提示的响应来执行对应的操作.
|
protected Prompt |
acceptValidatedInput(ConversationContext context,
java.lang.String input)
Override this method to accept and processes the validated input from
the user.
|
protected boolean |
isInputValid(ConversationContext context,
java.lang.String input)
Override this method to check the validity of the player's input.
|
acceptInput, blocksForInput, getFailedValidationTextclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetPromptTextprotected boolean isInputValid(ConversationContext context, java.lang.String input)
ValidatingPromptisInputValid 在类中 ValidatingPromptcontext - Context information about the conversation.input - The player's raw console input.protected Prompt acceptValidatedInput(ConversationContext context, java.lang.String input)
ValidatingPromptacceptValidatedInput 在类中 ValidatingPromptcontext - Context information about the conversation.input - The validated input text from the user.protected abstract Prompt acceptValidatedInput(ConversationContext context, boolean input)
原文:Override this method to perform some action with the user's boolean response.
context - 关于这个会话的Context 信息input - 用户响应的布尔值(true/false)Prompt