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.
A functional interface to provide an offset as a
Iterable consisting of PathVectors.-
Method Summary
Modifier and TypeMethodDescriptionGets the collection of vectors to check for neighbor nodes.default Iterable<PathVector>getOffsets(PathPosition currentPosition) Gets the collection of vectors based on the current position.
-
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
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
-