Class PathfinderResultImpl
java.lang.Object
de.bsommerfeld.pathetic.engine.result.PathfinderResultImpl
- All Implemented Interfaces:
PathfinderResult
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetPath()Returns the foundPathregardless if successful or not.Returns the state of the pathfinding.booleanWhether the pathfinder has failed to reach its target.booleanWhether a pathfinder has resulted in a fallback.booleanReturns whether the pathfinding was successful.
-
Constructor Details
-
PathfinderResultImpl
-
-
Method Details
-
successful
public boolean successful()Description copied from interface:PathfinderResultReturns whether the pathfinding was successful.- Specified by:
successfulin interfacePathfinderResult- Returns:
- true if the pathfinding was successful
-
hasFailed
public boolean hasFailed()Description copied from interface:PathfinderResultWhether the pathfinder has failed to reach its target. This includesPathState.FAILED,PathState.LENGTH_LIMITED,PathState.MAX_ITERATIONS_REACHEDandPathState.FALLBACK- Specified by:
hasFailedin interfacePathfinderResult- Returns:
- Whether the pathfinder has failed to reach its target
-
hasFallenBack
public boolean hasFallenBack()Description copied from interface:PathfinderResultWhether a pathfinder has resulted in a fallback.- Specified by:
hasFallenBackin interfacePathfinderResult- Returns:
- Whether a pathfinder has resulted in a fallback
-
getPathState
Description copied from interface:PathfinderResultReturns the state of the pathfinding.- Specified by:
getPathStatein interfacePathfinderResult- Returns:
- The
PathState
-
getPath
Description copied from interface:PathfinderResultReturns the foundPathregardless if successful or not. The path is empty if the pathfinding failed.- Specified by:
getPathin interfacePathfinderResult- Returns:
- The found
Path
-