net.xqhs.graphs.graph
Class SimpleNode
java.lang.Object
net.xqhs.graphs.representation.AbstractVisualizableGraphComponent
net.xqhs.graphs.graph.SimpleNode
- All Implemented Interfaces:
- GraphComponent, Node, VisualizableGraphComponent
- Direct Known Subclasses:
- HyperNode, NodeP
public class SimpleNode
- extends AbstractVisualizableGraphComponent
- implements Node
A simple implementation of the Node
interface, also inheriting functionality from
AbstractVisualizableGraphComponent
.
- Author:
- Andrei Olaru
Field Summary |
protected java.lang.String |
label
The label of the node |
Constructor Summary |
SimpleNode(java.lang.String nodeLabel)
Constructs a new node with the specified label and empty edge adjacency lists - representing an unconnected node. |
Method Summary |
java.lang.String |
getLabel()
If in need of a readable rendition of the node's features, use the toString function. |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
label
protected java.lang.String label
- The label of the node
SimpleNode
public SimpleNode(java.lang.String nodeLabel)
- Constructs a new node with the specified label and empty edge adjacency lists - representing an unconnected node.
- Parameters:
nodeLabel
- - the label of the node
getLabel
public java.lang.String getLabel()
- Description copied from interface:
Node
- If in need of a readable rendition of the node's features, use the
toString
function.
- Specified by:
getLabel
in interface Node
- Returns:
- the label of the node
toString
public java.lang.String toString()
- Overrides:
toString
in class java.lang.Object