G
- the game object type of the objectA
- the map arch object type of the objectR
- the archetype type of the objectpublic class KeywordValidator<G extends GameObject<G,A,R>,A extends MapArchObject<A>,R extends Archetype<G,A,R>>
extends java.lang.Object
Constructor and Description |
---|
KeywordValidator()
Creates a new instance.
|
Modifier and Type | Method and Description |
---|---|
void |
eof(@NotNull ErrorGenerator<G,A,R> generator)
Will be called at the end of processing.
|
void |
match(@NotNull ErrorGenerator<G,A,R> generator,
@NotNull java.lang.Iterable<java.lang.String> matchKeywords)
Processes a @match line.
|
void |
reply(@NotNull ErrorGenerator<G,A,R> generator,
@NotNull java.lang.String command,
@NotNull java.lang.String keyword)
Processes a @reply or @question line.
|
void |
reset()
Resets the checker state.
|
public void reset()
public void match(@NotNull @NotNull ErrorGenerator<G,A,R> generator, @NotNull @NotNull java.lang.Iterable<java.lang.String> matchKeywords)
generator
- the generator for error messagesmatchKeywords
- the list of keywords in the @match linepublic void reply(@NotNull @NotNull ErrorGenerator<G,A,R> generator, @NotNull @NotNull java.lang.String command, @NotNull @NotNull java.lang.String keyword)
generator
- the generator for error messagescommand
- the command; either '@reply' or '@question'keyword
- the keyword in the @reply or @question linepublic void eof(@NotNull @NotNull ErrorGenerator<G,A,R> generator)
generator
- the generator for error messages