org.dishevelled.graph
Interface Node<N,E>

Type Parameters:
N - node value type
E - edge value type

public interface Node<N,E>

Typed directed graph node.

Version:
$Revision$ $Date$
Author:
Michael Heuer

Method Summary
 int degree()
          Return the degree of this node.
 N getValue()
          Return the value at this node.
 Set<Edge<N,E>> inEdges()
          Return a read-only set view of the edges in this graph containing this node as the target.
 Set<Edge<N,E>> outEdges()
          Return a read-only set view of the edges in this graph containing this node as the source.
 void setValue(N value)
          Set the value at this node to value (optional operation).
 

Method Detail

getValue

N getValue()
Return the value at this node.

Returns:
the value at this node

setValue

void setValue(N value)
Set the value at this node to value (optional operation).

Parameters:
value - value at this node
Throws:
UnsupportedOperationException - if the setValue(N) operation is not supported by this node

degree

int degree()
Return the degree of this node.

Returns:
the degree of this node

inEdges

Set<Edge<N,E>> inEdges()
Return a read-only set view of the edges in this graph containing this node as the target. The view may be empty (if e.g. degree() == 0 or this node has only out edges) but will not be null.

Returns:
a read-only set view of the edges in this graph containing this node as the target

outEdges

Set<Edge<N,E>> outEdges()
Return a read-only set view of the edges in this graph containing this node as the source. The view may be empty (if e.g. degree() == 0 or this node has only in edges) but will not be null.

Returns:
a read-only set view of the edges in this graph containing this node as the source


Copyright (c) 2004-2012 held jointly by the individual authors. Licensed under the GNU Lesser General Public License (LGPL).