cad.simcad.objectserver.spec.pathfinding
Interface PathPlace

All Superinterfaces:
java.util.Comparator
All Known Subinterfaces:
MapUnit
All Known Implementing Classes:
Cell, CellGroup

public interface PathPlace
extends java.util.Comparator

This intereface defines the minimum services an object should provide if the object is to be included in a Path object

Version:
1.0
Author:
Charles-Philip Bentley

Method Summary
 boolean contained(PathPlace pp)
           
 boolean contains(PathPlace pp)
           
 boolean containsMapUnit(MapUnit mu)
          Returns true if the PathPlace contains the MapUnit given in argument
 boolean equals(PathPlace pp)
           
 PathPlace[] getAdjacentPathPlaces()
          Returns the array of adjacent PathPlace to this one.
 int getBiggestXLength()
           
 int getBiggestYLength()
           
 double getCostToReachFrom(PathPlace pp, PathUser pu)
           
 MapUnit[] getDifference(PathPlace pp)
          Return the MapUnits of the PathPlace that are not contained in the given PathPlace
 int getEastX()
           
 MapUnit[] getInnerMapUnitBoundary()
          Returns an Array of MapUnits that make the inner boundary of the PathPlace This method applied to a MapUnit PathPlace returns itself
 MapUnit[] getIntersection(PathPlace pp)
          Return the MapUnit contained in both PathPlaces( argument and object)
 AbstractMap getMap()
           
 MapUnit[] getMyAdjacentMapUnits(PathPlace pp)
          Returns the MapUnits of this PathPlace adjacent to the PathPlace given in argument
 int getNorthY()
           
 MapUnit[] getNotMyAdjacentMapUnits(PathPlace pp)
          Returns the MapUnits of the PathPlace given in argument adjacent to the current PathPlace
 int getNumberOfUnits()
          Returns the number of units contained in the PathPlace
 MapUnit[] getOuterMapUnitBoundary()
          Returns an Array of MapUnits that make the outer boundary of the PathPlace This method applied to a MapUnit PathPlace returns the same MapUnits
 int getSouthY()
           
 MapUnit[] getUnits()
          Returns an array of the MapUnit making up the PathPlace
 int getWestX()
           
 int getX()
           
 int getY()
           
 boolean isAdjacent(PathPlace mp)
          Returns true if the PathPlace given in argument is adjacent returns false otherwise
 void setValue(double value)
           
 
Methods inherited from interface java.util.Comparator
compare, equals
 

Method Detail

getCostToReachFrom

public double getCostToReachFrom(PathPlace pp,
                                 PathUser pu)

isAdjacent

public boolean isAdjacent(PathPlace mp)
Returns true if the PathPlace given in argument is adjacent returns false otherwise


getAdjacentPathPlaces

public PathPlace[] getAdjacentPathPlaces()
Returns the array of adjacent PathPlace to this one.


setValue

public void setValue(double value)

getUnits

public MapUnit[] getUnits()
Returns an array of the MapUnit making up the PathPlace


getNotMyAdjacentMapUnits

public MapUnit[] getNotMyAdjacentMapUnits(PathPlace pp)
Returns the MapUnits of the PathPlace given in argument adjacent to the current PathPlace

Pre:
A PathPlace
Post:
an array of the MapUnits contained in the PathPlace given in argument adjacent to the current PathPlace

getMyAdjacentMapUnits

public MapUnit[] getMyAdjacentMapUnits(PathPlace pp)
Returns the MapUnits of this PathPlace adjacent to the PathPlace given in argument

Pre:
A PathPlace
Post:
an array of the MapUnits contained in the current PathPlace adjacent the PathPlace given in argument

getOuterMapUnitBoundary

public MapUnit[] getOuterMapUnitBoundary()
Returns an Array of MapUnits that make the outer boundary of the PathPlace This method applied to a MapUnit PathPlace returns the same MapUnits


getInnerMapUnitBoundary

public MapUnit[] getInnerMapUnitBoundary()
Returns an Array of MapUnits that make the inner boundary of the PathPlace This method applied to a MapUnit PathPlace returns itself


containsMapUnit

public boolean containsMapUnit(MapUnit mu)
Returns true if the PathPlace contains the MapUnit given in argument


getIntersection

public MapUnit[] getIntersection(PathPlace pp)
Return the MapUnit contained in both PathPlaces( argument and object)


getDifference

public MapUnit[] getDifference(PathPlace pp)
Return the MapUnits of the PathPlace that are not contained in the given PathPlace


contains

public boolean contains(PathPlace pp)
Post:
true if the object contains entirely the given PathPlace

contained

public boolean contained(PathPlace pp)
Post:
true if the object is contained entirely in the PathPlace

getBiggestXLength

public int getBiggestXLength()

getBiggestYLength

public int getBiggestYLength()

getNorthY

public int getNorthY()

getSouthY

public int getSouthY()

getWestX

public int getWestX()

getEastX

public int getEastX()

getX

public int getX()
Post:
return an approximation x position

getY

public int getY()
Post:
return the approximative y position of the PathPlace on the Map

getMap

public AbstractMap getMap()

equals

public boolean equals(PathPlace pp)

getNumberOfUnits

public int getNumberOfUnits()
Returns the number of units contained in the PathPlace


Logo

With the help of www.sourceforge.net and www.info.ucl.ac.be