org.apache.maven.artifact.resolver.filter
Class CumulativeScopeArtifactFilter

java.lang.Object
  extended by org.apache.maven.artifact.resolver.filter.CumulativeScopeArtifactFilter
All Implemented Interfaces:
ArtifactFilter

public class CumulativeScopeArtifactFilter
extends Object

Filter to only retain objects in the given scope or better. This implementation allows the accumulation of multiple scopes and their associated implied scopes, so that the user can filter apply a series of implication rules in a single step. This should be a more efficient implementation of multiple standard ScopeArtifactFilter instances ORed together.

Author:
Brett Porter, jdcasey

Constructor Summary
CumulativeScopeArtifactFilter(Collection<String> scopes)
          Create a new filter with the specified scopes and their implied scopes enabled.
CumulativeScopeArtifactFilter(CumulativeScopeArtifactFilter... filters)
          Creates a new filter that combines the specified filters.
 
Method Summary
 boolean equals(Object obj)
           
 Set<String> getScopes()
           
 int hashCode()
           
 boolean include(Artifact artifact)
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CumulativeScopeArtifactFilter

public CumulativeScopeArtifactFilter(Collection<String> scopes)
Create a new filter with the specified scopes and their implied scopes enabled.

Parameters:
scopes - The scopes to enable, along with all implied scopes, may be null.

CumulativeScopeArtifactFilter

public CumulativeScopeArtifactFilter(CumulativeScopeArtifactFilter... filters)
Creates a new filter that combines the specified filters.

Parameters:
filters - The filters to combine, may be null.
Method Detail

getScopes

public Set<String> getScopes()

hashCode

public int hashCode()
Overrides:
hashCode in class Object

equals

public boolean equals(Object obj)
Overrides:
equals in class Object

include

public boolean include(Artifact artifact)
Specified by:
include in interface ArtifactFilter


Copyright © 2001–2013 The Apache Software Foundation. All rights reserved.