public interface ILcdPartitionedGraph<N,E> extends ILcdGraph<N,E>
ILcdPartitionedGraph
is an ILcdGraph
which is composed of partitions.
Since it is an ILcdGraph
, it should respect all invariants as
stated in the ILcdGraph
documentation, especially those concerning the uniqueness of a node or edge
in a graph.
The following terms are used in the context of partitioned graphs:
TLcdGraphChangedEvent
, fired by one of its child partitions,
should be propagated further (i.e., a new TLcdGraphChangedEvent
should be generated, with the same parameters, except for the source),
since each modification to a child partition
is also an identical modification to the partitioned graph as a whole.TLcdPartitionedGraphChangedEvent
, fired by this child,
should not be propagated further, as the child's internal structure (whether
it is a partitioned graph or not) is made abstraction of by this graph.
Modifier and Type  Method and Description 

void 
addPartitionedGraphListener(ILcdPartitionedGraphListener<N,E> aPartitionedGraphListener)
Registers the given
ILcdPartitionedGraphListener with this graph. 
boolean 
containsPartition(ILcdGraph<N,E> aPartition)
Returns true if the given graph is a partition of this graph, false otherwise.

Enumeration<E> 
getBoundaryEdges(ILcdGraph<N,E> aPartition)
Returns an enumeration containing all boundary edges of the given partition.

ILcdGraph<N,E> 
getBoundaryGraph()
Returns the boundary graph of this graph.

Enumeration<N> 
getBoundaryNodes(ILcdGraph<N,E> aPartition)
Returns an enumeration containing all boundary nodes of the given partition.

ILcdGraph<N,E> 
getPartitionForEdge(E aEdge)
Returns the partition of this partitioned graph that contains the given edge,
or
null if the given edge is not part of a partition in this graph. 
ILcdGraph<N,E> 
getPartitionForNode(N aNode)
Returns the partition of this partitioned graph that contains the given node,
or
null if the given node is not part of a partition in this graph. 
Enumeration<ILcdGraph<N,E>> 
getPartitions()
Returns an
Enumeration containing all partitions of this graph. 
void 
removePartitionedGraphListener(ILcdPartitionedGraphListener<N,E> aPartitionedGraphListener)
Unregisters the given
ILcdPartitionedGraphListener from this graph. 
addGraphListener, containsEdge, containsNode, getEdges, getEdges, getEndNode, getNodes, getOppositeNode, getStartNode, isConnected, removeGraphListener
Enumeration<ILcdGraph<N,E>> getPartitions()
Enumeration
containing all partitions of this graph.Enumeration
containing all the partitions of this graph.boolean containsPartition(ILcdGraph<N,E> aPartition)
aPartition
 the partition to be checked for.NullPointerException
 if aPartition
is null
.ILcdGraph<N,E> getPartitionForNode(N aNode)
null
if the given node is not part of a partition in this graph.aNode
 the node whose graph should be returned.NullPointerException
 if the given node is null
.ILcdGraph<N,E> getPartitionForEdge(E aEdge)
null
if the given edge is not part of a partition in this graph.
The partitions connected by a boundary edge should be retrieved by calling the
getPartitionForNode
method with as argument one of the two nodes
connected by this edge.aEdge
 the edge whose graph should be returned.IllegalArgumentException
 if the given edge is not part of this graph or the given edge is a boundary edge.NullPointerException
 if the given edge is null
.ILcdGraph<N,E> getBoundaryGraph()
Enumeration<E> getBoundaryEdges(ILcdGraph<N,E> aPartition)
aPartition
 the partition to which the boundary edges should be connected.NullPointerException
 if the given graph is null
.IllegalArgumentException
 if the given graph is not a partition of this partitioned graph.Enumeration<N> getBoundaryNodes(ILcdGraph<N,E> aPartition)
aPartition
 the partition from which the boundary should be part.NullPointerException
 if the given graph is null
.IllegalArgumentException
 if the given graph is not a partition of this partitioned graph.void addPartitionedGraphListener(ILcdPartitionedGraphListener<N,E> aPartitionedGraphListener)
ILcdPartitionedGraphListener
with this graph. All events
generated by this graph afterwards will be sent to the given listener, until
it is removed from this graph.aPartitionedGraphListener
 the graph listener to be registered with this graph.NullPointerException
 if the given listener is null
.void removePartitionedGraphListener(ILcdPartitionedGraphListener<N,E> aPartitionedGraphListener)
ILcdPartitionedGraphListener
from this graph. After it
has been unregistered, no events generated by this graph will be sent to the
given listener anymore.aPartitionedGraphListener
 the graph listener to be unregistered from this graph.NullPointerException
 if the given listener is null
.IllegalArgumentException
 if the given listener is not currently
registered as a listener of this graph.