Class PathObstacle
- java.lang.Object
 - 
- org.dreambot.api.methods.walking.pathfinding.impl.obstacle.PathObstacle
 
 
- 
- Direct Known Subclasses:
 ClimbableObstacle,DestructableObstacle,PassableObstacle,TeleportObstacle
public abstract class PathObstacle extends java.lang.ObjectCreated with IntelliJ IDEA.- Since:
 - : 3/31/2015 Time : 5:50 PM
 
 
- 
- 
Constructor Summary
Constructors Constructor Description PathObstacle(java.lang.String name, java.lang.String action, Tile startTile, Tile endTile, Tile obstacleTile)Creates a new PathObstacle 
- 
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract PathObstacleduplicate(Tile obsTile)Creates a new PathObstacle setting the obstacles tile Note: This MUST return a new PathObstacle with the correct obstacle tilebooleanequals(java.lang.Object obj)booleanexists()Checks whether the obstacles name, action, end tile, start tile, existing tile, and object itself existjava.lang.StringgetAction()Gets action.ConditiongetCondition()TilegetEndTile()Gets the ending tile of the obstaclejava.lang.StringgetName()Gets name.GameObjectgetObstacle()Get obstacle.TilegetObstacleTile()Gets the Tile the obstacle is onintgetPriority()Gets the priority of the obstacle, a higher integer means a higher priority, the highest priority obstacle found on a tile will be executed.TilegetStartTile()Gets the start tile for the obstacleinthashCode()abstract booleanisCompleted()Checks if the obstacle has been completedbooleanisValid()Checks to see if the obstacle existsvoidsetAction(java.lang.String action)Sets action.voidsetCondition(Condition condition)voidsetEndTile(Tile endTile)Sets the ending tile of the obstaclevoidsetName(java.lang.String name)Sets name.voidsetObstacleTile(Tile obstacleTile)Sets the Tile the obstacle is onvoidsetStartTile(Tile start)Sets the start tile of the obstaclebooleantraverse()Traverses the obstacle **NOTE** this is not abstract to preserve current compilation of existing overrides At some point when deprecated methods start to be removed, this *will* become abstract 
 - 
 
- 
- 
Constructor Detail
- 
PathObstacle
public PathObstacle(java.lang.String name, java.lang.String action, Tile startTile, Tile endTile, Tile obstacleTile)Creates a new PathObstacle- Parameters:
 name- Name of obstacleaction- Action of obstaclestartTile- Tile to be on/near to start of obstacleendTile- Tile to be on/near/be able to reach after using the obstacleobstacleTile- Tile of the obstacle
 
 - 
 
- 
Method Detail
- 
duplicate
public abstract PathObstacle duplicate(Tile obsTile)
Creates a new PathObstacle setting the obstacles tile Note: This MUST return a new PathObstacle with the correct obstacle tile- Parameters:
 obsTile- Obstacle's tile- Returns:
 - duplicated PathObstacle
 
 
- 
getName
public java.lang.String getName()
Gets name.- Returns:
 - the name
 
 
- 
setName
public void setName(java.lang.String name)
Sets name.- Parameters:
 name- the name
 
- 
getAction
public java.lang.String getAction()
Gets action.- Returns:
 - the action
 
 
- 
setAction
public void setAction(java.lang.String action)
Sets action.- Parameters:
 action- the action
 
- 
getEndTile
public Tile getEndTile()
Gets the ending tile of the obstacle- Returns:
 - Tile of the ending tile
 
 
- 
setEndTile
public void setEndTile(Tile endTile)
Sets the ending tile of the obstacle- Parameters:
 endTile- Tile you expect to be after you solve the obstacle
 
- 
getObstacleTile
public Tile getObstacleTile()
Gets the Tile the obstacle is on- Returns:
 - Tile of the obstacle's Tile
 
 
- 
setObstacleTile
public void setObstacleTile(Tile obstacleTile)
Sets the Tile the obstacle is on- Parameters:
 obstacleTile- Tile the obstacle is on
 
- 
getStartTile
public Tile getStartTile()
Gets the start tile for the obstacle- Returns:
 - the start tile of the obstacle
 
 
- 
setStartTile
public void setStartTile(Tile start)
Sets the start tile of the obstacle- Parameters:
 start- Tile expected to be at before solving the obstacle
 
- 
getObstacle
public GameObject getObstacle()
Get obstacle.- Returns:
 - the obstacle if it exists or null
 
 
- 
exists
public boolean exists()
Checks whether the obstacles name, action, end tile, start tile, existing tile, and object itself exist- Returns:
 - true if all exist, else false
 
 
- 
isCompleted
public abstract boolean isCompleted()
Checks if the obstacle has been completed- Returns:
 
 
- 
isValid
public boolean isValid()
Checks to see if the obstacle exists- Returns:
 
 
- 
traverse
public boolean traverse()
Traverses the obstacle **NOTE** this is not abstract to preserve current compilation of existing overrides At some point when deprecated methods start to be removed, this *will* become abstract- Returns:
 - true if successfully traversed
 
 
- 
getPriority
public int getPriority()
Gets the priority of the obstacle, a higher integer means a higher priority, the highest priority obstacle found on a tile will be executed.- Returns:
 - integer based priority, higher integer is higher priority, default is 1
 
 
- 
equals
public boolean equals(java.lang.Object obj)
- Overrides:
 equalsin classjava.lang.Object
 
- 
hashCode
public int hashCode()
- Overrides:
 hashCodein classjava.lang.Object
 
- 
getCondition
public Condition getCondition()
 
- 
setCondition
public void setCondition(Condition condition)
 
 - 
 
 -