|
||||||||||
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.
Nested Class Summary | |
---|---|
static interface |
IDependencyGraph.DerivationDetail<T,R>
The interface for specifing the details of an object derivation. |
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. |
|
|
deriveObject(T object,
IDependencyGraph.DerivationDetail<T,R> derivationDetail)
Derives a new object from an object in the graph, preserving the dependency information. |
|
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
<R> R deriveObject(T object, IDependencyGraph.DerivationDetail<T,R> derivationDetail)
R
- the derivative typeobject
- the object in the graphderivationDetail
- the details of the derivation
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |