|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.ggtools.grand.graph.AttributeManager
net.ggtools.grand.graph.NodeImpl
public class NodeImpl
| Field Summary |
|---|
| Fields inherited from interface net.ggtools.grand.graph.Node |
|---|
ATTR_CONDITIONAL_NODE, ATTR_MAIN_NODE, ATTR_MISSING_NODE, ATTR_START_NODE |
| Fields inherited from interface net.ggtools.grand.graph.GraphObject |
|---|
ATTR_ALL, ATTR_NONE |
| Constructor Summary | |
|---|---|
NodeImpl(java.lang.String name,
Graph graph)
Creates an new NodeImpl. |
|
| Method Summary | |
|---|---|
void |
accept(NodeVisitor visitor)
Accepts a visitor. |
void |
addBackLink(Link link)
Add a link to the node. |
void |
addLink(Link link)
Add a link to the node. |
boolean |
equals(java.lang.Object obj)
Returns true of the current object and obj are equals. |
java.util.Collection |
getBackLinks()
Returns links coming to the node. |
java.lang.String |
getDescription()
Returns a short description (one line of less) of the node. |
Graph |
getGraph()
Gets the owner graph of the object. |
java.util.Collection |
getLinks()
Returns links originating from the node. |
java.lang.String |
getName()
Gets the object's name. |
java.lang.String |
getSource()
Returns the source snippet for the node. |
int |
hashCode()
Compute a hash code for the current node. |
void |
removeBackLink(Link link)
Remove a link from the node. |
void |
removeLink(Link link)
Remove a link from the node. |
void |
setDescription(java.lang.String desc)
Sets the node's description. |
void |
setSource(java.lang.String newSource)
Sets the source snippet for the node. |
java.lang.String |
toString()
|
| Methods inherited from class net.ggtools.grand.graph.AttributeManager |
|---|
clearAttributes, getAttributes, hasAttributes, setAttributes |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface net.ggtools.grand.graph.GraphObject |
|---|
clearAttributes, getAttributes, hasAttributes, setAttributes |
| Constructor Detail |
|---|
public NodeImpl(java.lang.String name,
Graph graph)
name - node's namegraph - owner graph.| Method Detail |
|---|
public boolean equals(java.lang.Object obj)
obj are equals. Two
Nodes are equals when they belong to the same graph and they have the
same name.
equals in class java.lang.Objectobj - object to compare the node to.
Object.equals(java.lang.Object)public int hashCode()
hashCode in class java.lang.ObjectObject.hashCode()public java.lang.String toString()
toString in class java.lang.Objectpublic java.util.Collection getLinks()
Node
getLinks in interface Nodepublic java.util.Collection getBackLinks()
Node
getBackLinks in interface Nodepublic java.lang.String getDescription()
Node
getDescription in interface Nodepublic void setDescription(java.lang.String desc)
Node
setDescription in interface Nodedesc - node's descriptionpublic Graph getGraph()
GraphObject
getGraph in interface GraphObjectpublic java.lang.String getName()
GraphObject
getName in interface GraphObjectpublic void addLink(Link link)
Node
addLink in interface Nodelink - link to addpublic void addBackLink(Link link)
Node
addBackLink in interface Nodelink - link to addpublic void removeLink(Link link)
Node
removeLink in interface Nodelink - link to removepublic void removeBackLink(Link link)
Node
removeBackLink in interface Nodelink - link to removepublic void accept(NodeVisitor visitor)
NodevisitNode method of the visitor.
accept in interface Nodepublic java.lang.String getSource()
Nodenull if no source is available or if the source concept is
not relevant.
getSource in interface Nodenull;public void setSource(java.lang.String newSource)
newSource -
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||