Package repast.simphony.integration
Class DOMTraverser
- java.lang.Object
-
- repast.simphony.integration.DOMTraverser
-
-
Constructor Summary
Constructors Constructor Description DOMTraverser()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description double
getDistance(org.jdom.Element fromNode, org.jdom.Element toNode)
Returns either 1 if the elements are connected, otherwise Double.POSITIVE_INFINITY.Iterator<org.jdom.Element>
getSuccessors(org.jdom.Element previousNode, org.jdom.Element currentNode)
Returns the current node's children.
-
-
-
Method Detail
-
getSuccessors
public Iterator<org.jdom.Element> getSuccessors(org.jdom.Element previousNode, org.jdom.Element currentNode)
Returns the current node's children.- Specified by:
getSuccessors
in interfaceTraverser<org.jdom.Element>
- Parameters:
previousNode
- ignoredcurrentNode
- the node whose children are retrieved- Returns:
- what would be returned by currentNode.getChildren()
- See Also:
Element.getDescendants(org.jdom.filter.Filter)
,ElementFilter
-
getDistance
public double getDistance(org.jdom.Element fromNode, org.jdom.Element toNode)
Returns either 1 if the elements are connected, otherwise Double.POSITIVE_INFINITY.- Specified by:
getDistance
in interfaceTraverser<org.jdom.Element>
- Parameters:
fromNode
- one nodetoNode
- another node- Returns:
- 1 or POSITIVE_INFINITY
-
-