org.objectweb.perseus.dependency.lib
Class BasicDependencyGraph

java.lang.Object
  extended byorg.objectweb.perseus.dependency.lib.BasicDependencyGraph
All Implemented Interfaces:
DependencyGraph

public final class BasicDependencyGraph
extends java.lang.Object
implements DependencyGraph

Author:
S.Chassande-Barrioz

Field Summary
protected  Logger logger
           
 java.util.Map successors
           
 
Constructor Summary
BasicDependencyGraph()
           
 
Method Summary
 boolean addVertex(java.lang.Object src, java.lang.Object dst)
          Adds a vertex in the graph, or returns false is this would create a cycle.
 boolean addVertex(java.lang.Object src, java.lang.Object dst, java.util.Set s)
           
 int addVertexes(java.lang.Object src, java.util.List dsts)
          Add a vertex between a task and a list of other.
 void bindFc(java.lang.String s, java.lang.Object o)
           
 java.util.Map getVertexes()
           
 java.lang.String[] listFc()
           
 java.lang.Object lookupFc(java.lang.String s)
           
 void removeVertex(java.lang.Object src, java.lang.Object dst)
          Removes a vertex in the graph.
 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 dsts)
          Removes the vertexes/dependencies between a task and a list of others.
 void unbindFc(java.lang.String s)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

successors

public java.util.Map successors

logger

protected Logger logger
Constructor Detail

BasicDependencyGraph

public BasicDependencyGraph()
Method Detail

addVertex

public boolean addVertex(java.lang.Object src,
                         java.lang.Object dst,
                         java.util.Set s)

listFc

public java.lang.String[] listFc()

lookupFc

public java.lang.Object lookupFc(java.lang.String s)

bindFc

public void bindFc(java.lang.String s,
                   java.lang.Object o)

unbindFc

public void unbindFc(java.lang.String s)

addVertex

public boolean addVertex(java.lang.Object src,
                         java.lang.Object dst)
Adds a vertex in the graph, or returns false is this would create a cycle.

Specified by:
addVertex in interface DependencyGraph
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)
Description copied from interface: DependencyGraph
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.

Specified by:
addVertexes in interface DependencyGraph
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 a vertex in the graph.

Specified by:
removeVertex in interface DependencyGraph
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)
Description copied from interface: DependencyGraph
Removes the vertexes/dependencies between a list of tasks and another.

Specified by:
removeVertexes in interface DependencyGraph
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 dsts)
Description copied from interface: DependencyGraph
Removes the vertexes/dependencies between a task and a list of others.

Specified by:
removeVertexes in interface DependencyGraph
Parameters:
dsts - is the list of targets of the vertexes

getVertexes

public java.util.Map getVertexes()
Specified by:
getVertexes in interface DependencyGraph
Returns:
the current vertexes.
See Also:
DependencyGraph.getVertexes()


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