org.objectweb.perseus.dependency.api

Interface DependencyGraph

Known Implementing Classes:
BasicDependencyGraph

public interface DependencyGraph

Manage a dependency graph between object.

Author:
S.Chassande-Barrioz

Method Summary

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

Method Details

addVertex

public boolean addVertex(Object src,
                         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(Object src,
                       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.


getVertexes

public Map getVertexes()

Returns:
the current vertexes.


removeVertex

public void removeVertex(Object src,
                         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(List srcs,
                           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(Object src,
                           List dst)
Removes the vertexes/dependencies between a task and a list of others.

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


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