public class Node
extends java.lang.Object
| Constructor and Description |
|---|
Node(float x,
float y)
Creates a node with the given location.
|
| Modifier and Type | Method and Description |
|---|---|
void |
draw(processing.core.PApplet applet,
float px,
float py)
Draws the node in the given Processing applet.
|
java.util.HashSet<Edge> |
getInEdges()
Reports a set of all incoming edges attached to this node.
|
processing.core.PVector |
getLocation()
Reports the node's location.
|
java.util.HashSet<Edge> |
getOutEdges()
Reports a list of all outgoing edges attached to this node.
|
public Node(float x,
float y)
x - x-coordinate of the node's location.y - y-coordinate of the node's location.public void draw(processing.core.PApplet applet,
float px,
float py)
applet - Processing sketch in which to draw this node.px - x-coordinate of this node's graphical position.py - y-coordinate of this node's graphical position.public processing.core.PVector getLocation()
public java.util.HashSet<Edge> getInEdges()
public java.util.HashSet<Edge> getOutEdges()