oracle.ide.net
Class WildcardURLFilter
java.lang.Object
|
+--oracle.ide.net.WildcardURLFilter
- All Implemented Interfaces:
- URLFilter
- public class WildcardURLFilter
- extends java.lang.Object
- implements URLFilter
A URLFilter
that provides wildcard behavior.
Method Summary |
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. |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
WildcardURLFilter
public WildcardURLFilter(java.lang.String wildcard)
WildcardURLFilter
public WildcardURLFilter(java.lang.String wildcard,
boolean isCaseSensitive)
WildcardURLFilter
public WildcardURLFilter(java.lang.String wildcard,
boolean isCaseSensitive,
java.lang.String description)
accept
public boolean accept(java.net.URL url)
- Specified by:
accept
in interface URLFilter
- Following copied from interface:
oracle.ide.net.URLFilter
- Parameters:
url
- The URL
that is being filtered.- Returns:
true
if this filter allows the specified
URL
is allowed to be displayed or included. Returns
false
otherwise.- Throws:
NullPointerException
- if the specified URL
is null
.
match
protected boolean match(java.lang.String str)
hasWildcard
public static boolean hasWildcard(java.lang.String expression)
wildcard2Regexp
public static java.lang.String wildcard2Regexp(java.lang.String wildcard)
- Converts the specified wildcard into a regular expression.
makeLiteral
public 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.
equals
public boolean equals(java.lang.Object o)
- Description copied from interface:
URLFilter
- A concrete
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.
- Specified by:
equals
in interface URLFilter
- Overrides:
equals
in class java.lang.Object
equalsImpl
protected final boolean equalsImpl(WildcardURLFilter filter)
toString
public java.lang.String toString()
- Description copied from interface:
URLFilter
- The implementation of
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".
- Specified by:
toString
in interface URLFilter
- Overrides:
toString
in class java.lang.Object