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

## Class AbstractFilter

- java.lang.Object
- - org.apache.maven.shared.artifact.filter.resolve.AbstractFilter

All Implemented Interfaces:
  `TransformableFilter`

    public abstract class AbstractFilter
    extends java.lang.Object
    implements TransformableFilter

Abstract filter for custom implementations

Since:
  3.0
Author:
  Robert Scholte

### Constructor Summary

Constructors
`AbstractFilter()`

### Method Summary

All Methods Instance Methods Abstract Methods Concrete Methods
`abstract boolean` `accept​(Node node, java.util.List<Node> parents)`
`<T> T` `transform​(FilterTransformer<T> transformer)` Subclasses should include the following code:

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

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

### Constructor Detail

#### AbstractFilter

    public AbstractFilter()

### Method Detail

#### transform

    public final <T> T transform​(FilterTransformer<T> transformer)

Subclasses should include the following code:

       @Override
       public abstract <T> T transform( FilterTransformer<T> transformer )
       {
           return transformer.transform( this );
       }

Specified by:
  `transform` in interface `TransformableFilter`
Type Parameters:
  `T` - the interface of the tool specific filter
Parameters:
  `transformer` - the tool specific transformer, may not be `null`
Returns:
  the transformed value, never `null`

#### accept

    public abstract boolean accept​(Node node,
                                   java.util.List<Node> parents)

Parameters:
  `node` - `Node`
  `parents` - `Node`s.
Returns:
  `true` / `false`