cz.cuni.amis.pogamut.ut2004.agent.module.sensor
Class NavigationGraphBuilder.ExistingNavPointModifier

java.lang.Object
  extended by cz.cuni.amis.pogamut.ut2004.agent.module.sensor.NavigationGraphBuilder.ExistingNavPointModifier
Enclosing class:
NavigationGraphBuilder

public class NavigationGraphBuilder.ExistingNavPointModifier
extends java.lang.Object

Builder that allows you to modify edges of existing navpoint using createEdge(), createEdgeTo(String), modifyEdgeTo(String) methods.


Constructor Summary
protected NavigationGraphBuilder.ExistingNavPointModifier(NavPoint navPoint)
           
 
Method Summary
 NavigationGraphBuilder.ExistingNavPointEdgeBuilder createEdge()
          Returns a builder that will allow you to create new edge.
 NavigationGraphBuilder.ExistingNavPointEdgeBuilder createEdgeTo(java.lang.String navPointId)
          Returns a builder that will allow you to create new edge that is leading to 'navPointId'.
 void createSimpleEdgesBetween(java.lang.String navPointId)
          Creates two simple edges between this navpoint and the navpoint with 'navPointId'.
 void createSimpleEdgeTo(java.lang.String navPointId)
          Creates simple edge that leads from the navpoint you're currently creating to 'navPointId'.
 NavigationGraphBuilder.ExistingNavPointEdgeBuilder modifyEdgeTo(java.lang.String navPointId)
          Returns a builder that will allow you to modify properties of the edge that is leading to 'navPointId'.
 void removeEdgesBetween(java.lang.String navPointId)
          Removes edge that is leading from this navpoint to 'navPointId'.
 void removeEdgeTo(java.lang.String navPointId)
          Removes edge that is leading from this navpoint to 'navPointId'.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NavigationGraphBuilder.ExistingNavPointModifier

protected NavigationGraphBuilder.ExistingNavPointModifier(NavPoint navPoint)
Method Detail

removeEdgeTo

public void removeEdgeTo(java.lang.String navPointId)
Removes edge that is leading from this navpoint to 'navPointId'. Does not do anything if such edge does not exist.

Removes only one edge, if the edge with opposite direction exists, it leaves it there.

Parameters:
navPointId - will be auto-prefixed (if enabled, which is default)

removeEdgesBetween

public void removeEdgesBetween(java.lang.String navPointId)
Removes edge that is leading from this navpoint to 'navPointId'. Does not do anything if such edge does not exist.

Removes both edges, if the edge with opposite direction exists, it is deleted as well.

Parameters:
navPointId - will be auto-prefixed (if enabled, which is default)

modifyEdgeTo

public NavigationGraphBuilder.ExistingNavPointEdgeBuilder modifyEdgeTo(java.lang.String navPointId)
Returns a builder that will allow you to modify properties of the edge that is leading to 'navPointId'.

If no previous edge (leading to the same navpoint) exists, new one is created automatically.

Call NavigationGraphBuilder.ExistingNavPointEdgeBuilder.modifyEdge() when done specifying edge properties.

Parameters:
navPointId - will be auto-prefixed (if enabled, which is default)
Returns:

createEdgeTo

public NavigationGraphBuilder.ExistingNavPointEdgeBuilder createEdgeTo(java.lang.String navPointId)
Returns a builder that will allow you to create new edge that is leading to 'navPointId'. Note that the returned NavigationGraphBuilder.ExistingNavPointEdgeBuilder will have only NavigationGraphBuilder.ExistingNavPointEdgeBuilder.setTo(String) filled. It also has different behavior than in the case of modifyEdgeTo(String) as this new edge builder won't have any properties (except NavigationGraphBuilder.ExistingNavPointEdgeBuilder.setTo(String)) filled.

If same edge (leading to the same navpoint) exists, it is replaced automatically.

Call NavigationGraphBuilder.ExistingNavPointEdgeBuilder.createEdge() when done specifying edge properties.

Parameters:
navPointId - will be auto-prefixed (if enabled, which is default)
Returns:

createEdge

public NavigationGraphBuilder.ExistingNavPointEdgeBuilder createEdge()
Returns a builder that will allow you to create new edge. Note that the returned NavigationGraphBuilder.ExistingNavPointEdgeBuilder is empty, you must set the remote end of the edge manually using NavigationGraphBuilder.ExistingNavPointEdgeBuilder.setTo(String). It also has different behavior than in the case of modifyEdgeTo(String) as this new edge builder won't have any properties (except NavigationGraphBuilder.ExistingNavPointEdgeBuilder.setTo(String)) filled.

If same edge (leading to the same navpoint) exists, it is replaced automatically.

Call NavigationGraphBuilder.ExistingNavPointEdgeBuilder.createEdge() when done specifying edge properties.

Returns:

createSimpleEdgeTo

public void createSimpleEdgeTo(java.lang.String navPointId)
Creates simple edge that leads from the navpoint you're currently creating to 'navPointId'.

If edge exists, it won't be modified.

Parameters:
navPointId - will be auto-prefixed (if enabled, which is default)

createSimpleEdgesBetween

public void createSimpleEdgesBetween(java.lang.String navPointId)
Creates two simple edges between this navpoint and the navpoint with 'navPointId'.

If any of those two edges exists, it won't be modified.

Parameters:
navPointId - will be auto-prefixed (if enabled, which is default)