|
||||||||||
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.EdgeTypeFilter
public class EdgeTypeFilter
An EdgeTypeFilter filters out edges that do not have certain (prefix or postfix) types.
Nested Class Summary | |
---|---|
static interface |
EdgeTypeFilter.Listener
Am EdgeTypeFilter.Listener is notified of changes to the set of allowed edge type strings. |
Constructor Summary | |
---|---|
EdgeTypeFilter(java.util.Set<java.lang.String> allowedPrefixTypes)
Creates a new EdgeTypeFilter with the given allowed edge prefix types. |
|
EdgeTypeFilter(java.lang.String... allowedPrefixTypes)
Creates a new EdgeTypeFilter with the given allowed edge prefix types. |
Method Summary | |
---|---|
void |
addAllowedPostfixType(java.lang.String type)
Adds an allowed prefix type. |
void |
addAllowedPrefixType(java.lang.String type)
Adds an allowed prefix type. |
void |
addListener(EdgeTypeFilter.Listener listener)
Adds a listener. |
boolean |
allowsPostfix(java.lang.String type)
Does the filter allow the given postfix. |
boolean |
allowsPrefix(java.lang.String type)
Does the filter allow the given prefix. |
java.util.Collection<Edge> |
filterEdges(java.util.Collection<Edge> original)
Filters out all edges that don't have an allowed prefix and postfix type. |
java.util.Set<java.lang.String> |
getAllowedPostfixTypes()
Returns the set of allowed postfix types for edges. |
java.util.Set<java.lang.String> |
getAllowedPrefixTypes()
Returns the set of allowed prefix types for edges. |
void |
removeAllowedPostfixType(java.lang.String type)
Disallows the given postfix type. |
void |
removeAllowedPrefixType(java.lang.String type)
Disallows the given prefix type. |
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 EdgeTypeFilter(java.lang.String... allowedPrefixTypes)
allowedPrefixTypes
- the allowed prefix types.public EdgeTypeFilter(java.util.Set<java.lang.String> allowedPrefixTypes)
allowedPrefixTypes
- the allowed prefix types.Method Detail |
---|
public void addListener(EdgeTypeFilter.Listener listener)
listener
- the listener to add.public java.util.Set<java.lang.String> getAllowedPrefixTypes()
public java.util.Set<java.lang.String> getAllowedPostfixTypes()
public void addAllowedPrefixType(java.lang.String type)
type
- the allowed prefix type.public void addAllowedPostfixType(java.lang.String type)
type
- the allowed postfix type.public void removeAllowedPrefixType(java.lang.String type)
type
- the prefix type to disallow.public void removeAllowedPostfixType(java.lang.String type)
type
- the postfix type to disallow.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 allowsPrefix(java.lang.String type)
type
- the type to check whether it is allowed as prefix.
public boolean allowsPostfix(java.lang.String type)
type
- the type to check whether it is allowed as postfix.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |