|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--cad.simcad.pathfinding.path.Path
Mother class of any kind of path It defines the basic thing At creation a path is not consistent, even if origin and destination map places are adjacent
Field Summary | |
protected PathPlace |
_dest
|
protected java.util.Properties |
_historyOfComputing
|
protected PathFindable |
_map
|
protected PathPlace |
_origin
|
protected PathUser |
_pathUser
|
protected java.util.Vector |
_pathVector
first element is destination |
Constructor Summary | |
Path(PathFindable aMap,
PathPlace origin,
PathPlace dest,
PathUser pathUser)
Creates new Path Initialize. |
Method Summary | |
boolean |
addAdjacentPlaceToPath(PathPlace mp)
Same method as addPlaceToPath. |
boolean |
addPlaceToPath(PathPlace mp)
This method just add a PathPlace to the path this object represents. |
boolean |
addPlaceToPathSecured(PathPlace mp)
Safest and slowest method to add a Place to a path The method checks for adjacency, origin and destination |
java.lang.Object |
clone()
Clones this path |
java.util.Properties |
getComputingProperties()
Returns Properties related to the conpuatation of the Path |
PathPlace |
getDest()
Returns the destination Cell of the path |
PathPlace |
getLastInsertedPathPlace()
Returns the last inserted PathPlace |
PathPlace |
getOrigin()
Returns the origin Cell of the path |
java.util.Enumeration |
getPathEnum()
|
java.util.Enumeration |
getPathEnumDestFirst()
Enumeration of PathPlace Objects with Destination PathPlace first. |
java.util.Enumeration |
getPathEnumOriginFirst()
Enumeration of PathPlace Objects with Origin PathPlace as first element in the emumeration. |
PathUser |
getPathUser()
Return the PathUser walking this PathPlaceSet. |
boolean |
isComplete()
Returns true if origin or destination ends this path and the path is not a singleton. |
boolean |
isConsistent()
Check for path consistency We define path consistence as follows : a path is consistent if from any part of the path, there exists only one way to go to another part of the path An empty path is not consistent |
boolean |
isEmpty()
Return true if the Path has no PathPlace That means no PathPlace has been added yet. |
boolean |
isPartOfPath(PathPlace mp)
Return true if the PathPlace given in argument is part of the path. |
void |
setComputingProperties(java.util.Properties prop)
Set properties for this Path |
void |
setPathUser(PathUser pathUser)
|
Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected PathUser _pathUser
protected java.util.Vector _pathVector
protected PathFindable _map
protected PathPlace _origin
protected PathPlace _dest
protected java.util.Properties _historyOfComputing
Constructor Detail |
public Path(PathFindable aMap, PathPlace origin, PathPlace dest, PathUser pathUser)
Method Detail |
public PathUser getPathUser()
PathPlaceSet
getPathUser
in interface PathPlaceSet
public void setPathUser(PathUser pathUser)
public PathPlace getOrigin()
getOrigin
in interface PathPlaceSet
public PathPlace getDest()
getDest
in interface PathPlaceSet
public boolean isComplete()
public boolean isConsistent()
isConsistent
in interface PathPlaceSet
public boolean addPlaceToPath(PathPlace mp)
public boolean isEmpty()
public PathPlace getLastInsertedPathPlace()
public boolean addAdjacentPlaceToPath(PathPlace mp)
public boolean addPlaceToPathSecured(PathPlace mp) throws PathException
PathException
- If last inserted PathPlace is either the origin or the destination PathPlace of this Pathpublic boolean isPartOfPath(PathPlace mp)
public java.util.Enumeration getPathEnumOriginFirst()
getPathEnumOriginFirst
in interface PathPlaceSet
public java.util.Enumeration getPathEnum()
public java.util.Enumeration getPathEnumDestFirst()
getPathEnumDestFirst
in interface PathPlaceSet
public java.lang.Object clone()
clone
in class java.lang.Object
public void setComputingProperties(java.util.Properties prop)
public java.util.Properties getComputingProperties()
getComputingProperties
in interface PathPlaceSet
|
![]() |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |