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, toString
public void add(Edge e)
add
in interface Node
e
- Adjacent edge to add.Node.add(Edge)
public void remove(Edge e)
Node
remove
in interface Node
e
- Adjacent edge to remove.Node.remove(Edge)
public int getDegree()
Node
getDegree
in interface Node
Node.getDegree()
public Edge getEdge(Node other)
Node
getEdge
in interface Node
other
- The other node that the desired edge to return is adjacent to.Node.getEdge(Node)
public List getEdges(Node other)
Node
getEdges
in interface Node
other
- The other node that the desired edges to return are adjacent to.Node.getEdges(Node)
public List getEdges()
Node
getEdges
in interface Node
Node.getEdges()
public Iterator getRelated()
getRelated
in interface Graphable
Graphable.getRelated()
Copyright © 1996–2019 Geotools. All rights reserved.