|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.pfsw.odem.DependencySet<S,T>
public class DependencySet<S extends IExplorableElement,T extends IExplorableElement>
A set of IDependency objects. It allows to simply lookup particular elements and to iterate over the elements.
Type S defines the type of the source elements in the dependencies supported by this dependency set and type T specifies the type of the target elements.
Constructor Summary | |
---|---|
DependencySet()
Initialize the new instance with a default capcity of 50. |
|
DependencySet(int initialCapacity)
Initialize the new instance with an initial capacity. |
Method Summary | |
---|---|
void |
add(IDependency<S,T> dependency)
Add a new dependency. |
java.util.List<IDependency<S,T>> |
collect(IDependencyFilter<IDependency<S,T>> filter)
Return a list of all dependencies that match the given filter. |
java.util.List<IDependency<S,T>> |
collectForClassification(DependencyClassification classification)
Return a list of all dependencies with the given classification. |
void |
collectInto(java.util.Collection<IDependency<S,T>> collection,
IDependencyFilter<IDependency<S,T>> filter)
Adds all dependencies that match the given filter to the provided collection. |
DependencySet<S,T> |
copy()
Returns a copy of this dependency set that contains the identical dependency objects (i.e. no deep copy). |
IDependency<S,T> |
lookupSourceElement(S source)
Returns the first dependency with the source element equal to the given element. |
IDependency<S,T> |
lookupTargetElement(T target)
Returns the first dependency with the a target element equal to the given element. |
java.util.List<IDependency<S,T>> |
newList(int initialCapacity)
Returns a new list to hold dependency objects of the correct type. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DependencySet()
public DependencySet(int initialCapacity)
Method Detail |
---|
public void add(IDependency<S,T> dependency)
public IDependency<S,T> lookupSourceElement(S source)
source
- The source element to look for
public IDependency<S,T> lookupTargetElement(T target)
target
- The target element to look for
public void collectInto(java.util.Collection<IDependency<S,T>> collection, IDependencyFilter<IDependency<S,T>> filter)
collection
- The collection to which the dependencies will be addedfilter
- The filter that determines which dependencies to addpublic java.util.List<IDependency<S,T>> collect(IDependencyFilter<IDependency<S,T>> filter)
filter
- The filter the dependencies must match.
public java.util.List<IDependency<S,T>> collectForClassification(DependencyClassification classification)
classification
- The classification of the dependencies to collect.
public DependencySet<S,T> copy()
public java.util.List<IDependency<S,T>> newList(int initialCapacity)
initialCapacity
- The initial capacity of the new list.
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |