Package com.ibm.wala.util.graph.impl
Class NodeWithNumber
- java.lang.Object
-
- com.ibm.wala.util.graph.impl.NodeWithNumber
-
- All Implemented Interfaces:
INodeWithNumber
- Direct Known Subclasses:
AbstractStatement
,AbstractVariable
,NodeWithNumberedEdges
public class NodeWithNumber extends java.lang.Object implements INodeWithNumber
A node which carries it's own number; which identifies it in aNumberedGraph
implementation. Note that aNodeWithNumber
can live it at most oneNumberedGraph
at a time. TheNumberedGraph
will mutate the number here. So this is a bit fragile. Use this only if you know what you're doing.
-
-
Constructor Summary
Constructors Constructor Description NodeWithNumber()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
getGraphNodeId()
A non-negative integer which serves as an identifier for this node in it's "dominant" graph.void
setGraphNodeId(int i)
-
-
-
Method Detail
-
getGraphNodeId
public int getGraphNodeId()
Description copied from interface:INodeWithNumber
A non-negative integer which serves as an identifier for this node in it's "dominant" graph. Initially this number is -1; a NumberedGraph will set it to a non-negative value when this node is inserted into the graph- Specified by:
getGraphNodeId
in interfaceINodeWithNumber
- Returns:
- the number which identifies this node in the numbered graph
-
setGraphNodeId
public void setGraphNodeId(int i)
- Specified by:
setGraphNodeId
in interfaceINodeWithNumber
-
-