|
![]() |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
T_ElementKey
- The Key type for elements.T_ItemKey
- The Key type for items.public interface Dependencies<T_ElementKey,T_ItemKey>
Main Interface for the Dependency feature. Dependencies are a feature to sort targets based on advanced sort criterias. These sort criterias are:
Comparator
or a
predefined order
via setDefaultOrder(Comparator)
resp. setDefaultOrder(DependencyOrder)
.
DependencyElement.addAffects(T_Key)
and DependencyElement.addDepends(T_Key)
methods.
DependencyElement.addInput(T_ItemKey)
and DependencyElement.addOutput(T_ItemKey)
methods.
setAlgorithm(org.jtools.depend.DependencyResolution)
.
sort()
sorts the targets
in the implicite order and returns them in this order.
Method Summary | |
---|---|
DependencyElement<T_ElementKey,T_ItemKey> |
declareElement(T_ElementKey key)
Declares (constructs) an element with the given key. |
DependencyItem<T_ItemKey> |
declareItem(T_ItemKey key)
Declares (constructs) an item with the given key. |
DependencyElement<T_ElementKey,T_ItemKey> |
getElement(T_ElementKey key)
Gets a previous declared target with the given key. |
DependencyItem<T_ItemKey> |
getItem(T_ItemKey key)
Gets a previous declared item with the given key. |
boolean |
isChanged()
Indicates whether the dependencies had changed since the last sorting. |
boolean |
isDeepDependencyCheck()
Indicates whether the sorting algorithm does a deep dependency check. |
void |
setAlgorithm(DependencyAlgorithm<T_ElementKey,T_ItemKey> algorithm)
Set the algorithm to use for resolution of direct and indirect dependencies. |
void |
setAlgorithm(DependencyResolution algorithm)
Set the algorithm to use for resolution of direct and indirect dependencies. |
void |
setDeepDependencyCheck(Boolean onOff)
Set deep dependency check on or off. |
void |
setDefaultOrder(Comparator<? super DependencyElement<T_ElementKey,T_ItemKey>> comparator)
Sets the targets default sort order. |
void |
setDefaultOrder(DependencyOrder predefined)
Sets the targets default sort order. |
Collection<DependencyElement<T_ElementKey,T_ItemKey>> |
sort()
Get the targets sorted by primary and dependency order. |
Method Detail |
---|
DependencyItem<T_ItemKey> declareItem(T_ItemKey key)
key
- The unique key for this item.
DependencyElement<T_ElementKey,T_ItemKey> declareElement(T_ElementKey key)
key
- The unique key for this target.
DependencyItem<T_ItemKey> getItem(T_ItemKey key)
key
- The unique key for this item.
DependencyElement<T_ElementKey,T_ItemKey> getElement(T_ElementKey key)
key
- The unique key for this target.
boolean isChanged()
boolean isDeepDependencyCheck()
void setAlgorithm(DependencyResolution algorithm)
algorithm
- The predefined algorithm to use.void setAlgorithm(DependencyAlgorithm<T_ElementKey,T_ItemKey> algorithm)
algorithm
- The algorithm to use.void setDeepDependencyCheck(Boolean onOff)
onOff
- True to turn on the deep dependency check, false otherwise.Collection<DependencyElement<T_ElementKey,T_ItemKey>> sort() throws DependencyException
DependencyException
- if an error occurs.void setDefaultOrder(DependencyOrder predefined)
predefined
- One of the predefined sort orders.
DependencyException
- if an error occurs.void setDefaultOrder(Comparator<? super DependencyElement<T_ElementKey,T_ItemKey>> comparator)
comparator
- A custom comparator for DependencyTargets.
DependencyException
- if an error occurs.
|
![]() |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |