|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
S
- the identifier typeT
- the object typepublic interface IDependencyGraph<S extends Comparable<S>,T extends IDepending<S>>
The interface for graph structures that express and resolve object dependencies.
Method Summary | |
---|---|
boolean |
add(T object)
Adds an object to the graph if all dependencies can be resolved. |
List<T> |
addAll(Collection<T> objects)
Adds a collection of objects to the graph and tries to resolve dependencies. Returns a list of objects that could not be added cause they had missing dependencies or were part of a cycle. |
List<T> |
dependencySort(List<T> objects)
Returns a sorted list of the objects so that an object that depends on another object precedes it in the list. |
T |
get(S id)
Returns an object by it's identifier. |
List<T> |
remove(T object)
Removes an object from the graph and all objects depending on it. |
Method Detail |
---|
boolean add(T object)
object
- the object
List<T> remove(T object)
object
- the object to remove
List<T> addAll(Collection<T> objects)
objects
- the objects to add
T get(S id)
id
- the identifier
List<T> dependencySort(List<T> objects)
objects
- the objects
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |