|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectgraph.Node
| Field Summary | |
protected Graph |
graph
|
protected java.util.ArrayList |
in
|
protected java.util.ArrayList |
out
|
protected java.util.Map |
properties
|
| Constructor Summary | |
Node(Graph graph,
java.lang.String label)
Initializes a new Node belonging to graph given as argument with given label |
|
| Method Summary | |
Edge |
addEdge(Node dst)
Adds an edge starting from the node and ending to node given as argument |
protected void |
addInEdge(Edge e)
|
protected void |
addOutEdge(Edge e)
|
int |
compareTo(java.lang.Object n)
|
java.lang.String |
get(java.lang.String property)
Returns the value for the given property of the node |
java.util.ArrayList |
getAdj()
Returns an ArrayList of the Nodes adjanced to the node. |
double |
getDouble(java.lang.String property)
Returns the value for the given property of the node |
java.util.ArrayList |
getEdges()
|
java.util.ArrayList |
getInEdges()
Returns an ArrayList of edges that end to this node. |
int |
getInt(java.lang.String property)
Returns the value for the given property of the node |
java.util.ArrayList |
getNext()
Returns an ArrayList of all the nodes to which there exists an edge starting at the node Use this method with directed graphs |
java.util.ArrayList |
getOutEdges()
Returns an ArrayList of edges that start from this node. |
java.util.ArrayList |
getPrev()
Returns an ArrayList of all the nodes from which there exists an edge ending at the node Use this method with directed graphs |
java.lang.String |
label()
Returns label of the node |
void |
set(java.lang.String property,
java.lang.String value)
Sets the given property of the node to given value |
void |
setDouble(java.lang.String property,
double value)
Sets the given property of the node to given value |
void |
setInt(java.lang.String property,
int value)
Sets the given property of the node to given value |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
protected java.util.Map properties
protected Graph graph
protected java.util.ArrayList out
protected java.util.ArrayList in
| Constructor Detail |
public Node(Graph graph,
java.lang.String label)
graph - Graph the node belongs tolabel - the label of the node| Method Detail |
protected void addOutEdge(Edge e)
protected void addInEdge(Edge e)
public java.lang.String label()
public int compareTo(java.lang.Object n)
compareTo in interface java.lang.Comparablepublic java.util.ArrayList getAdj()
public java.util.ArrayList getEdges()
public java.util.ArrayList getNext()
public java.util.ArrayList getOutEdges()
public java.util.ArrayList getPrev()
public java.util.ArrayList getInEdges()
public Edge addEdge(Node dst)
dst - the destination node of the edge
public void set(java.lang.String property,
java.lang.String value)
property - a String containing property for which the value is setvalue - a String containing the new value for the property
public void setInt(java.lang.String property,
int value)
property - a String containing property for which the value is setvalue - an integer containing the new value for the property
public void setDouble(java.lang.String property,
double value)
property - a String containing property for which the value is setvalue - an double containing the new value for the propertypublic java.lang.String get(java.lang.String property)
property - a String containing the requested property
public int getInt(java.lang.String property)
property - a String containing the requested property
public double getDouble(java.lang.String property)
property - a String containing the requested property
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||