Constructor and Description |
---|
WildcardURLFilter(java.lang.String wildcard) |
WildcardURLFilter(java.lang.String wildcard, boolean isCaseSensitive) |
WildcardURLFilter(java.lang.String wildcard, boolean isCaseSensitive, java.lang.String description) |
Modifier and Type | Method and Description |
---|---|
boolean |
accept(java.net.URL url) |
boolean |
equals(java.lang.Object o)
A concrete
URLFilter must provide an implementation for the equals(...) method that compares the URLFilter to another one. |
protected boolean |
equalsImpl(WildcardURLFilter filter) |
static boolean |
hasWildcard(java.lang.String expression) |
static java.lang.String |
makeLiteral(java.lang.String string)
Escapes all non-alphanumeric characters in the specified string and returns the resulting regular expression literal.
|
protected boolean |
match(java.lang.String str) |
java.lang.String |
toString()
The implementation of
toString() must return a short description that can be shown to the user describing what the filter is filter for. |
static java.lang.String |
wildcard2Regexp(java.lang.String wildcard)
Converts the specified wildcard into a regular expression.
|
public WildcardURLFilter(java.lang.String wildcard)
public WildcardURLFilter(java.lang.String wildcard, boolean isCaseSensitive)
public WildcardURLFilter(java.lang.String wildcard, boolean isCaseSensitive, java.lang.String description)
public boolean accept(java.net.URL url)
protected boolean match(java.lang.String str)
public static boolean hasWildcard(java.lang.String expression)
public static java.lang.String wildcard2Regexp(java.lang.String wildcard)
public static java.lang.String makeLiteral(java.lang.String string)
public boolean equals(java.lang.Object o)
URLFilter
URLFilter
must provide an implementation for the equals(...)
method that compares the URLFilter
to another one. A return value of true
means that both this URLFilter
and the specified URLFilter
will accept identical sets of URL
s and that the descriptions used to identify the filters are equal.protected final boolean equalsImpl(WildcardURLFilter filter)
public java.lang.String toString()
URLFilter
toString()
must return a short description that can be shown to the user describing what the filter is filter for. For example: "JPG and GIF images".