Class AndDependencyTraverser
java.lang.Object
org.eclipse.aether.util.graph.traverser.AndDependencyTraverser
- All Implemented Interfaces:
- DependencyTraverser
A dependency traverser that combines zero or more other traversers using a logical 
AND. The resulting
 traverser enables processing of child dependencies if and only if all constituent traversers request traversal.- 
Constructor SummaryConstructorsConstructorDescriptionAndDependencyTraverser(Collection<? extends DependencyTraverser> traversers) Creates a new traverser from the specified traversers.AndDependencyTraverser(DependencyTraverser... traversers) Creates a new traverser from the specified traversers.
- 
Method SummaryModifier and TypeMethodDescriptionDerives a dependency traverser that will be used to decide whether the transitive dependencies of the dependency given in the collection context shall be traversed.booleaninthashCode()static DependencyTraversernewInstance(DependencyTraverser traverser1, DependencyTraverser traverser2) Creates a new traverser from the specified traversers.booleantraverseDependency(Dependency dependency) Decides whether the dependencies of the specified dependency should be traversed.
- 
Constructor Details- 
AndDependencyTraverserCreates a new traverser from the specified traversers. PrefernewInstance(DependencyTraverser, DependencyTraverser)if any of the input traversers might benull.- Parameters:
- traversers- the traversers to combine, may be- nullbut must not contain- nullelements
 
- 
AndDependencyTraverserCreates a new traverser from the specified traversers.- Parameters:
- traversers- the traversers to combine, may be- nullbut must not contain- nullelements
 
 
- 
- 
Method Details- 
newInstancepublic static DependencyTraverser newInstance(DependencyTraverser traverser1, DependencyTraverser traverser2) Creates a new traverser from the specified traversers.- Parameters:
- traverser1- the first traverser to combine, may be- null
- traverser2- the second traverser to combine, may be- null
- Returns:
- the combined traverser or nullif both traversers werenull
 
- 
traverseDependencyDescription copied from interface:DependencyTraverserDecides whether the dependencies of the specified dependency should be traversed.- Specified by:
- traverseDependencyin interface- DependencyTraverser
- Parameters:
- dependency- The dependency to check, must not be- null.
- Returns:
- trueif the dependency graph builder should recurse into the specified dependency and process its dependencies,- falseotherwise.
 
- 
deriveChildTraverserDescription copied from interface:DependencyTraverserDerives a dependency traverser that will be used to decide whether the transitive dependencies of the dependency given in the collection context shall be traversed. When calculating the child traverser, implementors are strongly advised to simply return the current instance if nothing changed to help save memory.- Specified by:
- deriveChildTraverserin interface- DependencyTraverser
- Parameters:
- context- The dependency collection context, must not be- null.
- Returns:
- The dependency traverser for the target node or nullif dependencies should be unconditionally traversed in the sub graph.
 
- 
equals
- 
hashCode
 
-