public class OptNode extends OptGraphable implements Node
Node, 
Serialized Form| Modifier and Type | Class and Description | 
|---|---|
| class  | OptNode.RelatedIteratorAn iterator used to iterate over related nodes. | 
| Constructor and Description | 
|---|
| OptNode()Constructs a new OptimizedNode. | 
| OptNode(int degree)Constructs a new Optimized Node with a known degree. | 
| Modifier and Type | Method and Description | 
|---|---|
| void | add(Edge e)Adds an edge to the adjacency list of the node. | 
| int | getDegree()Returns the degree of the node. | 
| Edge | getEdge(Node other)Returns an edge in the adjacency list of the node that is adjacent to another specified node. | 
| Edge[] | getEdgeArray()Returns the edge adjacency list of the node as an array. | 
| List | getEdges()Returns the edge adjacency list of the node. | 
| List | getEdges(Node other)Returns a collection of edges in the adjacency list of the node that are adjacent to another
 specified node. | 
| Iterator | getRelated()This iterator iterates over the underlying edge array of the node. | 
| void | remove(Edge e)Not supported. | 
| void | setDegree(int degree)Sets the degree of the node. | 
getCount, getID, getObject, isVisited, setCount, setID, setObject, setVisitedpublic OptNode()
public OptNode(int degree)
degree - The degree of the node.public void add(Edge e)
Nodeadd in interface Nodee - Adjacent edge to add.Node.add(Edge)public void remove(Edge e)
remove in interface Nodee - Adjacent edge to remove.UnsupportedOperationExceptionNode.remove(Edge)public Edge getEdge(Node other)
NodegetEdge in interface Nodeother - The other node that the desired edge to return is adjacent to.Node.getEdge(Node)public List getEdges(Node other)
NodegetEdges in interface Nodeother - The other node that the desired edges to return are adjacent to.Node.getEdges(Node)public Edge[] getEdgeArray()
public List getEdges()
NodegetEdges in interface NodeNode.getEdges()public void setDegree(int degree)
degree - The degree of the node / size of edge adjacency array.public int getDegree()
NodegetDegree in interface NodeNode.getDegree()public Iterator getRelated()
getRelated in interface GraphableGraphable.getRelated()Copyright © 1996–2019 Geotools. All rights reserved.