KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > objectweb > perseus > dependency > api > DependencyGraph


1 /**
2  * Copyright (C) 2003 France Telecom R&D
3  *
4  * This library is free software; you can redistribute it and/or
5  * modify it under the terms of the GNU Lesser General Public
6  * License as published by the Free Software Foundation; either
7  * version 2 of the License, or (at your option) any later version.
8  *
9  * This library is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12  * Lesser General Public License for more details.
13  *
14  * You should have received a copy of the GNU Lesser General Public
15  * License along with this library; if not, write to the Free Software
16  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17  */

18 package org.objectweb.perseus.dependency.api;
19
20 /**
21  * Manage a dependency graph between object.
22  *
23  * @author S.Chassande-Barrioz
24  */

25 public interface DependencyGraph {
26     /**
27      * Add a vertex between to task. If the added vertex creates a cycle, it is
28      * not added, and the 'false' value is returned.
29      *
30      * @param src is the source of the vertex
31      * @param dst is the target of the vertex
32      * @return 'true' is the vertex has been added. 'false' if the vertex would
33      * create a cycle if it has been added.
34      */

35     boolean addVertex(Object JavaDoc src, Object JavaDoc dst);
36
37     /**
38      * Removes the vertex/dependency between two tasks.
39      *
40      * @param src is the source of the vertex
41      * @param dst is the target of the vertex
42      */

43     void removeVertex(Object JavaDoc src, Object JavaDoc dst);
44 }
45
Popular Tags