org.objectweb.perseus.dependency.api
Interface DependencyGraph

All Known Implementing Classes:
BasicDependencyGraph

public interface DependencyGraph

Manage a dependency graph between object.

Author:
S.Chassande-Barrioz

Method Summary
 boolean addVertex(java.lang.Object src, java.lang.Object dst)
          Add a vertex between to task.
 int addVertexes(java.lang.Object src, java.util.List dsts)
          Add a vertex between a task and a list of other.
 java.util.Map getVertexes()
           
 void removeVertex(java.lang.Object src, java.lang.Object dst)
          Removes the vertex/dependency between two tasks.
 void removeVertexes(java.util.List srcs, java.lang.Object dst)
          Removes the vertexes/dependencies between a list of tasks and another.
 void removeVertexes(java.lang.Object src, java.util.List dst)
          Removes the vertexes/dependencies between a task and a list of others.
 

Method Detail

addVertex

public boolean addVertex(java.lang.Object src,
                         java.lang.Object dst)
Add a vertex between to task. If the added vertex creates a cycle, it is not added, and the 'false' value is returned.

Parameters:
src - is the source of the vertex
dst - is the target of the vertex
Returns:
'true' is the vertex has been added. 'false' if the vertex would create a cycle if it has been added.

addVertexes

public int addVertexes(java.lang.Object src,
                       java.util.List dsts)
Add a vertex between a task and a list of other. If the added vertex creates a cycle, it is not added, and the index (in the list) of the target task is returned, otherwise it return -1.

Parameters:
src - is the source of the vertex
Returns:
the index (in the list) of the target task is returned, otherwise it return -1.

removeVertex

public void removeVertex(java.lang.Object src,
                         java.lang.Object dst)
Removes the vertex/dependency between two tasks.

Parameters:
src - is the source of the vertex
dst - is the target of the vertex

removeVertexes

public void removeVertexes(java.util.List srcs,
                           java.lang.Object dst)
Removes the vertexes/dependencies between a list of tasks and another.

Parameters:
srcs - is the list of sources of the vertexes
dst - is the target of the vertexes

removeVertexes

public void removeVertexes(java.lang.Object src,
                           java.util.List dst)
Removes the vertexes/dependencies between a task and a list of others.

Parameters:
dst - is the list of targets of the vertexes

getVertexes

public java.util.Map getVertexes()
Returns:
the current vertexes.


Copyright © 2000-2002 France Telecom S.A., INRIA, IMAG-LSR All Rights Reserved.