|
||||||||||
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(java.util.Set<java.lang.String> allowedLabels)
Creates a new EdgeLabelFilter that allows the given label substrings. |
|
EdgeLabelFilter(java.lang.String... allowedLabels)
Creates a new EdgeLabelFilter that allows the given label substrings. |
Method Summary | |
---|---|
void |
addAllowedLabel(java.lang.String label)
Adds an allowed label substring. |
boolean |
allows(java.lang.String label)
Checks whether the filter allows the given label substring. |
void |
clear()
Removes all allowed label substrings. |
java.util.Collection<Edge> |
filterEdges(java.util.Collection<Edge> original)
Filters out all edges that don't have a label that contains one of the allowed label substrings. |
void |
removeAllowedLabel(java.lang.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(java.lang.String... allowedLabels)
allowedLabels
- var array label substrings that are allowed.public EdgeLabelFilter(java.util.Set<java.lang.String> allowedLabels)
allowedLabels
- a set of label substrings that are allowed.Method Detail |
---|
public void addAllowedLabel(java.lang.String label)
label
- the label that should be allowed.public void removeAllowedLabel(java.lang.String label)
label
- the label substring to disallow.public void clear()
public java.util.Collection<Edge> filterEdges(java.util.Collection<Edge> original)
filterEdges
in class EdgeFilter
original
- the original set of edges.
EdgeFilter#filterEdges(Collection)
public boolean allows(java.lang.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 |