|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.googlecode.whatswrong.EdgeFilter
com.googlecode.whatswrong.EdgeLabelFilter
public class EdgeLabelFilter
An EdgeLabelFilter filters out edges with a label that contains one of a set of allowed label substrings.
Note that if the set of allowed label substrings is empty the filter allows all edges.
| Constructor Summary | |
|---|---|
EdgeLabelFilter(Set<String> allowedLabels)
Creates a new EdgeLabelFilter that allows the given label substrings. |
|
EdgeLabelFilter(String... allowedLabels)
Creates a new EdgeLabelFilter that allows the given label substrings. |
|
| Method Summary | |
|---|---|
void |
addAllowedLabel(String label)
Adds an allowed label substring. |
boolean |
allows(String label)
Checks whether the filter allows the given label substring. |
void |
clear()
Removes all allowed label substrings. |
Collection<Edge> |
filterEdges(Collection<Edge> original)
Filters out all edges that don't have a label that contains one of the allowed label substrings. |
void |
removeAllowedLabel(String label)
Removes an allowed label substring. |
| Methods inherited from class com.googlecode.whatswrong.EdgeFilter |
|---|
filter |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public EdgeLabelFilter(String... allowedLabels)
allowedLabels - var array label substrings that are allowed.public EdgeLabelFilter(Set<String> allowedLabels)
allowedLabels - a set of label substrings that are allowed.| Method Detail |
|---|
public void addAllowedLabel(String label)
label - the label that should be allowed.public void removeAllowedLabel(String label)
label - the label substring to disallow.public void clear()
public Collection<Edge> filterEdges(Collection<Edge> original)
filterEdges in class EdgeFilteroriginal - the original set of edges.
EdgeFilter#filterEdges(Collection) public boolean allows(String label)
label - the label substring we want to check whether the filter allows it.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||