Package org.eclipse.aether.util.filter
Class AndDependencyFilter
java.lang.Object
org.eclipse.aether.util.filter.AndDependencyFilter
- All Implemented Interfaces:
org.eclipse.aether.graph.DependencyFilter
public final class AndDependencyFilter
extends Object
implements org.eclipse.aether.graph.DependencyFilter
A dependency filter that combines zero or more other filters using a logical
AND. The resulting filter
accepts a given dependency node if and only if all constituent filters accept it.-
Constructor Summary
ConstructorsConstructorDescriptionAndDependencyFilter(Collection<org.eclipse.aether.graph.DependencyFilter> filters) Creates a new filter from the specified filters.AndDependencyFilter(org.eclipse.aether.graph.DependencyFilter... filters) Creates a new filter from the specified filters. -
Method Summary
Modifier and TypeMethodDescriptionbooleanaccept(org.eclipse.aether.graph.DependencyNode node, List<org.eclipse.aether.graph.DependencyNode> parents) booleaninthashCode()static org.eclipse.aether.graph.DependencyFilternewInstance(org.eclipse.aether.graph.DependencyFilter filter1, org.eclipse.aether.graph.DependencyFilter filter2) Creates a new filter from the specified filters.
-
Constructor Details
-
AndDependencyFilter
Creates a new filter from the specified filters. PrefernewInstance(DependencyFilter, DependencyFilter)if any of the input filters might benull.- Parameters:
filters- the filters to combine, may benullbut must not containnullelements
-
AndDependencyFilter
Creates a new filter from the specified filters.- Parameters:
filters- the filters to combine, may benullbut must not containnullelements
-
-
Method Details
-
newInstance
public static org.eclipse.aether.graph.DependencyFilter newInstance(org.eclipse.aether.graph.DependencyFilter filter1, org.eclipse.aether.graph.DependencyFilter filter2) Creates a new filter from the specified filters.- Parameters:
filter1- the first filter to combine, may benullfilter2- the second filter to combine, may benull- Returns:
- the combined filter or
nullif both filter werenull
-
accept
public boolean accept(org.eclipse.aether.graph.DependencyNode node, List<org.eclipse.aether.graph.DependencyNode> parents) - Specified by:
acceptin interfaceorg.eclipse.aether.graph.DependencyFilter
-
equals
-
hashCode
-