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

    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      G getExit​(@NotNull MapModel<G,​A,​R> mapModel, @Nullable java.awt.Point point)
      Returns an exit game object on a given map square.
      G getExit​(G exit)
      Returns whether the given game object is an exit game object.
      G getValidExit​(@NotNull MapModel<G,​A,​R> mapModel, @NotNull java.awt.Point point)
      Returns an exit game object on a given map square having exit information.
      @Nullable GameObject<G,​A,​R> getValidExit​(G exit)
      Returns whether the given game object is an exit game object having exit information.
      boolean isMatching​(@NotNull GameObject<?,​?,​?> gameObject)
      Matches a GameObject.
      • Methods inherited from class java.lang.Object

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

      • ExitMatcher

        public ExitMatcher​(@NotNull
                           @NotNull GameObjectMatcher exitMatcher)
        Creates a new instance.
        Parameters:
        exitMatcher - the matcher for selecting exit objects
    • Method Detail

      • getValidExit

        @Nullable
        public G getValidExit​(@NotNull
                              @NotNull MapModel<G,​A,​R> mapModel,
                              @NotNull
                              @NotNull java.awt.Point point)
        Returns an exit game object on a given map square having exit information.
        Parameters:
        mapModel - the map model to check
        point - the map square to check
        Returns:
        the head of the exit game object
      • getValidExit

        @Nullable
        public @Nullable GameObject<G,​A,​R> getValidExit​(@Nullable
                                                                    G exit)
        Returns whether the given game object is an exit game object having exit information.
        Parameters:
        exit - the game object to check
        Returns:
        the game object's head if it is an exit game object or else null
      • getExit

        @Nullable
        public G getExit​(@NotNull
                         @NotNull MapModel<G,​A,​R> mapModel,
                         @Nullable
                         @Nullable java.awt.Point point)
        Returns an exit game object on a given map square.
        Parameters:
        mapModel - the map model to check
        point - the map square to check
        Returns:
        the head of the exit game object or null if none was found
      • getExit

        @Nullable
        public G getExit​(@Nullable
                         G exit)
        Returns whether the given game object is an exit game object.
        Parameters:
        exit - the game object to check
        Returns:
        the game object's head if it is an exit game object or else null
      • isMatching

        public boolean isMatching​(@NotNull
                                  @NotNull GameObject<?,​?,​?> gameObject)
        Description copied from interface: GameObjectMatcher
        Matches a GameObject.
        Specified by:
        isMatching in interface GameObjectMatcher
        Parameters:
        gameObject - the GameObject to match
        Returns:
        true if this matcher matches the given game object, otherwise false