public class BasicNode extends BasicGraphable implements Node
| Constructor and Description |
|---|
BasicNode()
Constructs a BasicNode.
|
| Modifier and Type | Method and Description |
|---|---|
void |
add(Edge e)
Adds an edge to the adjacency list of the node which is an underlying List implementation.
|
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.
|
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()
Returns all nodes that are incident with adjacent edges minus itself.
|
void |
remove(Edge e)
Removes an edge from the adjacency list of the node.
|
getCount, getID, getObject, isVisited, setCount, setID, setObject, setVisited, toStringpublic void add(Edge e)
add in interface Nodee - Adjacent edge to add.Node.add(Edge)public void remove(Edge e)
Noderemove in interface Nodee - Adjacent edge to remove.Node.remove(Edge)public int getDegree()
NodegetDegree in interface NodeNode.getDegree()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 List getEdges()
NodegetEdges in interface NodeNode.getEdges()public Iterator getRelated()
getRelated in interface GraphableGraphable.getRelated()Copyright © 1996–2019 Geotools. All rights reserved.