public final class AndDependencySelector extends java.lang.Object implements DependencySelector
AND. The resulting selector
selects a given dependency if and only if all constituent selectors do so.| Modifier and Type | Field and Description |
|---|---|
private int |
hashCode |
private java.util.Set<? extends DependencySelector> |
selectors |
| Modifier | Constructor and Description |
|---|---|
|
AndDependencySelector(java.util.Collection<? extends DependencySelector> selectors)
Creates a new selector from the specified selectors.
|
|
AndDependencySelector(DependencySelector... selectors)
Creates a new selector from the specified selectors.
|
private |
AndDependencySelector(java.util.Set<DependencySelector> selectors) |
| Modifier and Type | Method and Description |
|---|---|
DependencySelector |
deriveChildSelector(DependencyCollectionContext context)
Derives a dependency selector for the specified collection context.
|
boolean |
equals(java.lang.Object obj) |
int |
hashCode() |
static DependencySelector |
newInstance(DependencySelector selector1,
DependencySelector selector2)
Creates a new selector from the specified selectors.
|
boolean |
selectDependency(Dependency dependency)
Decides whether the specified dependency should be included in the dependency graph.
|
private final java.util.Set<? extends DependencySelector> selectors
private int hashCode
public AndDependencySelector(DependencySelector... selectors)
newInstance(DependencySelector, DependencySelector) if any of the input selectors might be null.selectors - The selectors to combine, may be null but must not contain null elements.public AndDependencySelector(java.util.Collection<? extends DependencySelector> selectors)
selectors - The selectors to combine, may be null but must not contain null elements.private AndDependencySelector(java.util.Set<DependencySelector> selectors)
public static DependencySelector newInstance(DependencySelector selector1, DependencySelector selector2)
selector1 - The first selector to combine, may be null.selector2 - The second selector to combine, may be null.null if both selectors were null.public boolean selectDependency(Dependency dependency)
DependencySelectorselectDependency in interface DependencySelectordependency - The dependency to check, must not be null.false if the dependency should be excluded from the children of the current node, true
otherwise.public DependencySelector deriveChildSelector(DependencyCollectionContext context)
DependencySelectorderiveChildSelector in interface DependencySelectorcontext - The dependency collection context, must not be null.null if dependencies should be unconditionally
included in the sub graph.public boolean equals(java.lang.Object obj)
equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Object