Class KeywordValidator<G extends GameObject<G,A,R>,A extends MapArchObject<A>,R extends Archetype<G,A,R>>
- java.lang.Object
-
- net.sf.gridarta.var.crossfire.model.validation.checks.KeywordValidator<G,A,R>
-
- Type Parameters:
G- the game object type of the objectA- the map arch object type of the objectR- the archetype type of the object
public class KeywordValidator<G extends GameObject<G,A,R>,A extends MapArchObject<A>,R extends Archetype<G,A,R>> extends java.lang.ObjectChecks that the matched keywords are correct.
-
-
Constructor Summary
Constructors Constructor Description KeywordValidator()Creates a new instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voideof(@NotNull ErrorGenerator<G,A,R> generator)Will be called at the end of processing.voidmatch(@NotNull ErrorGenerator<G,A,R> generator, @NotNull java.lang.Iterable<java.lang.String> matchKeywords)Processes a @match line.voidreply(@NotNull ErrorGenerator<G,A,R> generator, @NotNull java.lang.String command, @NotNull java.lang.String keyword)Processes a @reply or @question line.voidreset()Resets the checker state.
-
-
-
Method Detail
-
reset
public void reset()
Resets the checker state. Afterwards the state is the same as if a new instance was created.
-
match
public void match(@NotNull @NotNull ErrorGenerator<G,A,R> generator, @NotNull @NotNull java.lang.Iterable<java.lang.String> matchKeywords)Processes a @match line.- Parameters:
generator- the generator for error messagesmatchKeywords- the list of keywords in the @match line
-
reply
public void reply(@NotNull @NotNull ErrorGenerator<G,A,R> generator, @NotNull @NotNull java.lang.String command, @NotNull @NotNull java.lang.String keyword)Processes a @reply or @question line.- Parameters:
generator- the generator for error messagescommand- the command; either '@reply' or '@question'keyword- the keyword in the @reply or @question line
-
eof
public void eof(@NotNull @NotNull ErrorGenerator<G,A,R> generator)Will be called at the end of processing.- Parameters:
generator- the generator for error messages
-
-