|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.jscience.architecture.traffic.infrastructure.SPData
public class SPData
Holds data needed to find the shortest path from a node to an exit node.
| Nested Class Summary | |
|---|---|
protected class |
SPData.Path
One Path holds all known Drivelanes that are on a shortest path to a given exitNode using a Roaduser with a certain type, starting at the Node SPData belongs to |
| Field Summary | |
|---|---|
protected java.lang.String |
parentName
DOCUMENT ME! |
protected java.util.Vector |
paths
The paths known |
| Constructor Summary | |
|---|---|
SPData()
Creates a new SPData object. |
|
SPData(int size)
Creates a new SPData object. |
|
| Method Summary | |
|---|---|
void |
addShortestPath(Drivelane lane,
int exitNodeId,
int ruType,
int length)
Adds a Drivelane to the lanes already found for exitNodeId and ruType. |
boolean |
canCreateInstance(java.lang.Class request)
DOCUMENT ME! |
java.lang.Object |
createInstance(java.lang.Class request)
DOCUMENT ME! |
int[] |
getShortestPathDestinations(int ruType)
DOCUMENT ME! |
Drivelane[] |
getShortestPaths(int exitNodeId,
int ruType)
Returns an array of Drivelanes that are on 1 of the shortest paths from the node this SPData belongs to, to the Node with exiNodeId, for Roadusers with type ruType. |
java.lang.String |
getXMLName()
DOCUMENT ME! |
void |
load(XMLElement myElement,
XMLLoader loader)
Load this XMLSerializable |
void |
loadSecondStage(java.util.Dictionary dictionaries)
DOCUMENT ME! |
void |
remAllPaths(int exitNodeId,
int ruType)
Removes all Drivelanes found for exitNodeId and ruType. |
void |
remPaths(int exitId,
int ruType,
int length)
Removes all the Drivelanes found for exitNodeId and ruType and length > length |
void |
saveChilds(XMLSaver saver)
DOCUMENT ME! |
XMLElement |
saveSelf()
DOCUMENT ME! |
void |
setParentName(java.lang.String parentName)
DOCUMENT ME! |
void |
setShortestPath(Drivelane lane,
int exitNodeId,
int ruType,
int length)
Sets the shortest path to given exit node using roaduser type to given Drivelane |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected java.util.Vector paths
protected java.lang.String parentName
| Constructor Detail |
|---|
public SPData()
public SPData(int size)
size - DOCUMENT ME!| Method Detail |
|---|
public Drivelane[] getShortestPaths(int exitNodeId,
int ruType)
exitNodeId - The Id of the exit node that is your destination.ruType - The type of Roaduser.
public int[] getShortestPathDestinations(int ruType)
ruType - DOCUMENT ME!
public void setShortestPath(Drivelane lane,
int exitNodeId,
int ruType,
int length)
lane - The Drivelane to set the path toexitNodeId - The Id of the exit node this path leads toruType - The type of Roaduserlength - DOCUMENT ME!
public void addShortestPath(Drivelane lane,
int exitNodeId,
int ruType,
int length)
lane - The Drivelane to add to the pathexitNodeId - The Id of the exit node this path leads toruType - The type of Roaduserlength - DOCUMENT ME!
public void remAllPaths(int exitNodeId,
int ruType)
exitNodeId - The Id of the exit node this path leads toruType - The type of Roaduser
public void remPaths(int exitId,
int ruType,
int length)
exitId - The Id of the exit node this path leads toruType - The type of Roaduserlength - The maximum length a path may have to remain
public void load(XMLElement myElement,
XMLLoader loader)
throws XMLTreeException,
java.io.IOException,
XMLInvalidInputException
XMLSerializable
load in interface XMLSerializablemyElement - The XMLElement which represents this object in the XML
tree. It can contain attributes which hold information about the
object.loader - The XMLLoader which this XMLSerializable can use to load
child objects.
XMLTreeException - The parser can throw this exception if it is
called by the XMLSerializable. The XMLSerializable should NOT
throw this exception by itself and preferrably not catch it
too.
java.io.IOException - Thrown in case of an read error in the XML file.
XMLInvalidInputException - The XMLSerializable can throw this
exception if it cannot load itself or one of its child objects
for whatever reason.
public XMLElement saveSelf()
throws XMLCannotSaveException
saveSelf in interface XMLSerializableXMLCannotSaveException - DOCUMENT ME!
public void saveChilds(XMLSaver saver)
throws XMLTreeException,
java.io.IOException,
XMLCannotSaveException
saveChilds in interface XMLSerializablesaver - DOCUMENT ME!
XMLTreeException - DOCUMENT ME!
java.io.IOException - DOCUMENT ME!
XMLCannotSaveException - DOCUMENT ME!public java.lang.String getXMLName()
getXMLName in interface XMLSerializablepublic void setParentName(java.lang.String parentName)
setParentName in interface XMLSerializableparentName - DOCUMENT ME!
public void loadSecondStage(java.util.Dictionary dictionaries)
throws XMLInvalidInputException,
XMLTreeException
loadSecondStage in interface TwoStageLoaderdictionaries - DOCUMENT ME!
XMLInvalidInputException - DOCUMENT ME!
XMLTreeException - DOCUMENT ME!public boolean canCreateInstance(java.lang.Class request)
canCreateInstance in interface InstantiationAssistantrequest - DOCUMENT ME!
public java.lang.Object createInstance(java.lang.Class request)
throws java.lang.ClassNotFoundException,
java.lang.InstantiationException,
java.lang.IllegalAccessException
createInstance in interface InstantiationAssistantrequest - DOCUMENT ME!
java.lang.ClassNotFoundException - DOCUMENT ME!
java.lang.InstantiationException - DOCUMENT ME!
java.lang.IllegalAccessException - DOCUMENT ME!
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||