public class ExclusionSearch extends java.lang.Object implements TreeSearch
TreeSearch
that excludes figures contained in a
Collection
.Constructor and Description |
---|
ExclusionSearch(java.util.Collection collection)
Constructs an Exclusion search using the given collection.
|
Modifier and Type | Method and Description |
---|---|
boolean |
accept(IFigure figure)
Returns
true if the given figure is accepted by the search. |
boolean |
prune(IFigure f)
Returns
true if the figure is a member of the Collection. |
public ExclusionSearch(java.util.Collection collection)
collection
- the exclusion setpublic boolean accept(IFigure figure)
TreeSearch
true
if the given figure is accepted by the search.accept
in interface TreeSearch
figure
- the current figure in the traversaltrue
if the figure is acceptedTreeSearch.accept(IFigure)
public boolean prune(IFigure f)
true
if the figure is a member of the Collection.prune
in interface TreeSearch
f
- the current figure in the traversaltrue
if the subgraph should be prunedTreeSearch.prune(IFigure)
Copyright (c) IBM Corp. and others 2000, 2011. All Rights Reserved.