Package org.apache.maven.shared.artifact.filter.collection

## Class ProjectTransitivityFilter

- java.lang.Object
- - org.apache.maven.shared.artifact.filter.collection.AbstractArtifactsFilter
  - - org.apache.maven.shared.artifact.filter.collection.ProjectTransitivityFilter

All Implemented Interfaces:
  `ArtifactsFilter`

    public class ProjectTransitivityFilter
    extends AbstractArtifactsFilter

Author:
  Brian Fox

### Constructor Summary

Constructors
`ProjectTransitivityFilter​(java.util.Set<org.apache.maven.artifact.Artifact> directDependencies, boolean excludeTransitive)`

### Method Summary

All Methods Instance Methods Concrete Methods
`boolean` `artifactIsADirectDependency​(org.apache.maven.artifact.Artifact artifact)` Compares the artifact to the list of dependencies to see if it is directly included by this project
`java.util.Set<org.apache.maven.artifact.Artifact>` `filter​(java.util.Set<org.apache.maven.artifact.Artifact> artifacts)`
`boolean` `isExcludeTransitive()`
`void` `setExcludeTransitive​(boolean excludeTransitive)`

### Methods inherited from class org.apache.maven.shared.artifact.filter.collection.AbstractArtifactsFilter

`isArtifactIncluded`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Constructor Detail

#### ProjectTransitivityFilter

    public ProjectTransitivityFilter​(java.util.Set<org.apache.maven.artifact.Artifact> directDependencies,
                                     boolean excludeTransitive)

Parameters:
  `directDependencies` - set of direct dependencies.
  `excludeTransitive` - `true` exclude transitive deps `false` otherwise.

### Method Detail

#### filter

    public java.util.Set<org.apache.maven.artifact.Artifact> filter​(java.util.Set<org.apache.maven.artifact.Artifact> artifacts)

Parameters:
  `artifacts` - `Artifact`
Returns:
  Set of artifacts.

#### artifactIsADirectDependency

    public boolean artifactIsADirectDependency​(org.apache.maven.artifact.Artifact artifact)

Compares the artifact to the list of dependencies to see if it is directly included by this project

Parameters:
  `artifact` - representing the item to compare.
Returns:
  true if artifact is a direct dependency

#### isExcludeTransitive

    public boolean isExcludeTransitive()

Returns:
  Returns the excludeTransitive.

#### setExcludeTransitive

    public void setExcludeTransitive​(boolean excludeTransitive)

Parameters:
  `excludeTransitive` - The excludeTransitive to set.