Class TextValidator<G extends GameObject<G,​A,​R>,​A extends MapArchObject<A>,​R extends Archetype<G,​A,​R>>

  • Type Parameters:
    G - the game object type of the object
    A - the map arch object type of the object
    R - the archetype type of the object

    public class TextValidator<G extends GameObject<G,​A,​R>,​A extends MapArchObject<A>,​R extends Archetype<G,​A,​R>>
    extends java.lang.Object
    Checks for suspicious text lines.
    • Constructor Summary

      Constructors 
      Constructor Description
      TextValidator()
      Creates a new instance.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void empty​(@NotNull ErrorGenerator<G,​A,​R> generator)
      Processes an empty line of text.
      void eof​(@NotNull ErrorGenerator<G,​A,​R> generator)
      Will be called at the end of processing.
      void match​(@NotNull ErrorGenerator<G,​A,​R> generator)
      Processes a @match line.
      void reply​(@NotNull ErrorGenerator<G,​A,​R> generator)
      Processes a qreply or @question line.
      void reset()
      Resets the checker state.
      void text​(@NotNull ErrorGenerator<G,​A,​R> generator)
      Processes a non-empty line of text.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • TextValidator

        public TextValidator()
        Creates a new instance.
    • Method Detail

      • reset

        public void reset()
        Resets the checker state. Afterwards the state is the same as if a new instance was created.
      • text

        public void text​(@NotNull
                         @NotNull ErrorGenerator<G,​A,​R> generator)
        Processes a non-empty line of text.
        Parameters:
        generator - the generator for error messages
      • empty

        public void empty​(@NotNull
                          @NotNull ErrorGenerator<G,​A,​R> generator)
        Processes an empty line of text.
        Parameters:
        generator - the generator for error messages
      • match

        public void match​(@NotNull
                          @NotNull ErrorGenerator<G,​A,​R> generator)
        Processes a @match line.
        Parameters:
        generator - the generator for error messages
      • reply

        public void reply​(@NotNull
                          @NotNull ErrorGenerator<G,​A,​R> generator)
        Processes a qreply or @question line.
        Parameters:
        generator - the generator for error messages
      • 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