|
||||||||||
| 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(Set<String> allowedPrefixTypes)
Creates a new EdgeTypeFilter with the given allowed edge prefix types. |
|
EdgeTypeFilter(String... allowedPrefixTypes)
Creates a new EdgeTypeFilter with the given allowed edge prefix types. |
|
| Method Summary | |
|---|---|
void |
addAllowedPostfixType(String type)
Adds an allowed prefix type. |
void |
addAllowedPrefixType(String type)
Adds an allowed prefix type. |
void |
addListener(EdgeTypeFilter.Listener listener)
Adds a listener. |
boolean |
allowsPostfix(String type)
Does the filter allow the given postfix. |
boolean |
allowsPrefix(String type)
Does the filter allow the given prefix. |
Collection<Edge> |
filterEdges(Collection<Edge> original)
Filters out all edges that don't have an allowed prefix and postfix type. |
Set<String> |
getAllowedPostfixTypes()
Returns the set of allowed postfix types for edges. |
Set<String> |
getAllowedPrefixTypes()
Returns the set of allowed prefix types for edges. |
void |
removeAllowedPostfixType(String type)
Disallows the given postfix type. |
void |
removeAllowedPrefixType(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(String... allowedPrefixTypes)
allowedPrefixTypes - the allowed prefix types.public EdgeTypeFilter(Set<String> allowedPrefixTypes)
allowedPrefixTypes - the allowed prefix types.| Method Detail |
|---|
public void addListener(EdgeTypeFilter.Listener listener)
listener - the listener to add.public Set<String> getAllowedPrefixTypes()
public Set<String> getAllowedPostfixTypes()
public void addAllowedPrefixType(String type)
type - the allowed prefix type.public void addAllowedPostfixType(String type)
type - the allowed postfix type.public void removeAllowedPrefixType(String type)
type - the prefix type to disallow.public void removeAllowedPostfixType(String type)
type - the postfix type to disallow.public Collection<Edge> filterEdges(Collection<Edge> original)
filterEdges in class EdgeFilteroriginal - the original set of edges.
EdgeFilter#filterEdges(Collection) public boolean allowsPrefix(String type)
type - the type to check whether it is allowed as prefix.
public boolean allowsPostfix(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 | |||||||||