org.gcube.data.trees.data
Class Edge

java.lang.Object
  extended by org.gcube.data.trees.data.Edge

public final class Edge
extends Object

A labelled edge that connects two Nodes.

Author:
Fabio Simeoni

Constructor Summary
Edge(Edge e)
          Copy constructor, creates a clone of a given edge.
Edge(QName l, Node n)
          Creates an instance with a label and a node.
Edge(String l, Node n)
          Creates an instance with a label and a node.
Edge(String ns, String l, Node n)
          Creates an instance with a label and a node.
 
Method Summary
 boolean equals(Object obj)
          
 int hashCode()
          
 QName label()
          Returns the label.
 Node target()
          Returns the target node.
 void target(Node n)
          Sets the target node.
 String toString()
          
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Edge

public Edge(Edge e)
Copy constructor, creates a clone of a given edge.

Parameters:
e - the edge

Edge

public Edge(QName l,
            Node n)
Creates an instance with a label and a node.

Parameters:
l - the label
n - the node

Edge

public Edge(String l,
            Node n)
Creates an instance with a label and a node.

Parameters:
l - the local name of the label
n - the node

Edge

public Edge(String ns,
            String l,
            Node n)
Creates an instance with a label and a node.

Parameters:
ns - the namespace of the label
l - the local name of the label
n - the node
Method Detail

label

public QName label()
Returns the label.

Returns:
the label

target

public Node target()
Returns the target node.

Returns:
the node

target

public void target(Node n)
Sets the target node.

Parameters:
n - node

toString

public String toString()

Overrides:
toString in class Object

hashCode

public int hashCode()

Overrides:
hashCode in class Object

equals

public boolean equals(Object obj)

Overrides:
equals in class Object


Copyright © 2012. All Rights Reserved.