com.sun.tools.doclets.util
Class Specifier
java.lang.Object
|
+--com.sun.tools.doclets.util.Specifier
- public class Specifier
- extends java.lang.Object
Foundation class for package and filename matching.
Possible patterns include:
s -- equals s
s* -- starts with s
*s -- ends with s
*s* -- contains s
s1*s2 -- starts with s1, ends with s2
s1*s2* -- starts with s1, contains s2
*s1*s2* -- contains s1 and s2
etc.
Note:
A null pattern matches everything. The match(java.lang.String)
function always returns true. However, when a null
string, is compared to any pattern, the null string
always returns false. (A null string matches nothing.)
When a null string is compared to a null pattern, the
result is false. (The null string takes precedence.)
- Author:
- Eric Armstrong
- See Also:
PathSpecifier,
FileSpecifier
|
Constructor Summary |
Specifier(java.lang.String pattern)
Create a specifier object, supplying a pattern
to match. |
|
Method Summary |
boolean |
match(java.lang.String s)
Return true if the argument is a match for this
specifier. |
java.lang.String |
toString()
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
equals
protected boolean equals
startsWith
protected boolean startsWith
endsWith
protected boolean endsWith
contains
protected boolean contains
Specifier
public Specifier(java.lang.String pattern)
- Create a specifier object, supplying a pattern
to match.
match
public boolean match(java.lang.String s)
- Return true if the argument is a match for this
specifier.
- Parameters:
s - The string to match, where a null or empty
string matches nothing
toString
public java.lang.String toString()
- Overrides:
toString in class java.lang.Object
Report a bug or suggest a feature
Copyright 2000-2003 Sun Microsystems, Inc. 4150 Network Circle
Santa Clara, CA 95054, U.S.A. All Rights Reserved.