Interface INeighborStrategy

Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface public interface INeighborStrategy
A functional interface to provide an offset as a Iterable consisting of PathVectors.
  • Method Details

    • getOffsets

      Iterable<PathVector> getOffsets()
      Gets the collection of vectors to check for neighbor nodes. Used for static strategies where neighbors are always the same (e.g. Grid).
    • getOffsets

      default Iterable<PathVector> getOffsets(PathPosition currentPosition)
      Gets the collection of vectors based on the current position. Default implementation delegates to the static getOffsets() for backward compatibility.
      Parameters:
      currentPosition - The position for which to get neighbors.
      Returns:
      An iterable of PathVectors.
      Since:
      5.4.1