public abstract class FixedSetPrompt extends ValidatingPrompt
| 限定符和类型 | 字段和说明 |
|---|---|
protected java.util.List<java.lang.String> |
fixedSet |
END_OF_CONVERSATION| 构造器和说明 |
|---|
FixedSetPrompt(java.lang.String... fixedSet)
Creates a FixedSetPrompt from a set of strings.
|
| 限定符和类型 | 方法和说明 |
|---|---|
protected java.lang.String |
formatFixedSet()
Utility function to create a formatted string containing all the
options declared in the constructor.
|
protected boolean |
isInputValid(ConversationContext context,
java.lang.String input)
Override this method to check the validity of the player's input.
|
acceptInput, acceptValidatedInput, blocksForInput, getFailedValidationTextclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetPromptTextpublic FixedSetPrompt(java.lang.String... fixedSet)
foo = new FixedSetPrompt("bar", "cheese", "panda");
fixedSet - A fixed set of strings, one of which the user must
type.protected boolean isInputValid(ConversationContext context, java.lang.String input)
ValidatingPromptisInputValid 在类中 ValidatingPromptcontext - Context information about the conversation.input - The player's raw console input.protected java.lang.String formatFixedSet()