Class StateDependencyNodeFilter

java.lang.Object
org.apache.maven.shared.dependency.tree.filter.StateDependencyNodeFilter
All Implemented Interfaces:
DependencyNodeFilter

public class StateDependencyNodeFilter extends Object implements DependencyNodeFilter
A dependency node filter that accepts nodes depending on their state.
Since:
1.1
Version:
$Id: StateDependencyNodeFilter.java 1595642 2014-05-18 17:32:08Z jvanzyl $
Author:
Mark Hobson
  • Field Details

    • INCLUDED

      public static final StateDependencyNodeFilter INCLUDED
      A dependency node filter that only accepts included nodes.
  • Constructor Details

    • StateDependencyNodeFilter

      public StateDependencyNodeFilter(int state)
      Creates a dependency node filter that only accepts dependency nodes of the specified state.
      Parameters:
      state - the state of dependency nodes to accept
      Throws:
      IllegalArgumentException - if the specified state is invalid
  • Method Details

    • accept

      public boolean accept(DependencyNode node)
      Gets whether this filter accepts the specified dependency node.
      Specified by:
      accept in interface DependencyNodeFilter
      Parameters:
      node - the dependency node to check
      Returns:
      true if this filter accepts the specified dependency node
    • getState

      public int getState()
      Gets the dependency node state that this filter accepts.
      Returns:
      the dependency node state that this filter accepts