Interface NavigationPath

All Superinterfaces:
Iterable<Position>, SpeedModifier

public interface NavigationPath extends Iterable<Position>, SpeedModifier
Represents a Path for an Entity
  • Method Details

    • isDone

      boolean isDone()
      Whether this NavigationPath is complete.
      Returns:
      true if complete, else false
    • containsAll

      default boolean containsAll(Collection<? extends Position> coll)
      Whether this NavigationPath contains all of these Navigation Nodes.
      Parameters:
      coll - Collection to test
      Returns:
      true if contains, else false
    • contains

      boolean contains(@Nullable @Nullable Position node)
      Whether this Path contains this Navigation Node.
      Parameters:
      node - Position
      Returns:
      true if contains, else false
    • isEmpty

      boolean isEmpty()
      Whether this NavigationPath is empty.
      Returns:
      true if empty, else false
    • advance

      void advance() throws IllegalArgumentException
      Advances this path.
      Throws:
      IllegalArgumentException - if isDone() is true
    • toArray

      Position[] toArray()
      Converts this NavigationPath into an Array of Nodes.
      Returns:
      Array of Position
    • indexOf

      int indexOf(@Nullable @Nullable Position o)
      Returns the index of this Navigation Node.
      Parameters:
      o - Position to fetch
      Returns:
      Index found
      See Also:
    • lastIndexOf

      int lastIndexOf(@Nullable @Nullable Position o)
      Returns the last index of this Navigation Node.
      Parameters:
      o - Position to fetch
      Returns:
      Index found
      See Also:
    • containsAll

      default boolean containsAll(@Nullable @Nullable Position... nodes)
      Whether this NavigationPath contains all of these Navigation Nodes.
      Parameters:
      nodes - Nodes to test
      Returns:
      true if contains, else false