Class ExclusionSearch

java.lang.Object
org.eclipse.draw2d.ExclusionSearch
All Implemented Interfaces:
TreeSearch

public class ExclusionSearch extends Object implements TreeSearch
A TreeSearch that excludes figures contained in a Collection.
Since:
2.1
  • Constructor Details

    • ExclusionSearch

      public ExclusionSearch(Collection<IFigure> collection)
      Constructs an Exclusion search using the given collection.
      Parameters:
      collection - the exclusion set
  • Method Details

    • accept

      public boolean accept(IFigure figure)
      Description copied from interface: TreeSearch
      Returns true if the given figure is accepted by the search.
      Specified by:
      accept in interface TreeSearch
      Parameters:
      figure - the current figure in the traversal
      Returns:
      true if the figure is accepted
      See Also:
    • prune

      public boolean prune(IFigure f)
      Returns true if the figure is a member of the Collection.
      Specified by:
      prune in interface TreeSearch
      Parameters:
      f - the current figure in the traversal
      Returns:
      true if the subgraph should be pruned
      See Also: