net.axyana.qizxopen.util
Class GlobPattern
java.lang.Object
net.axyana.qizxopen.util.StringPattern
net.axyana.qizxopen.util.GlobPattern
- Direct Known Subclasses:
- LikePattern
- public class GlobPattern
- extends StringPattern
Unix-style globbing (SQL-LIKE mapped to this pattern by converting characters).
Method Summary |
java.lang.String |
fixedPrefix()
Returns the leading constant part of the pattern. |
static boolean |
glob(char[] string,
int ps,
char[] pattern,
int pp)
|
boolean |
matches(char[] string)
Redefinable matching method. |
boolean |
matches(java.lang.String string)
|
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
GlobPattern
public GlobPattern(java.lang.String pattern)
GlobPattern
public GlobPattern(char[] pattern,
int length)
matches
public boolean matches(java.lang.String string)
matches
public boolean matches(char[] string)
- Description copied from class:
StringPattern
- Redefinable matching method.
- Overrides:
matches
in class StringPattern
fixedPrefix
public java.lang.String fixedPrefix()
- Description copied from class:
StringPattern
- Returns the leading constant part of the pattern. Used to boost matching
and lookup in indexes.
- Overrides:
fixedPrefix
in class StringPattern
toString
public java.lang.String toString()
- Overrides:
toString
in class StringPattern
glob
public static boolean glob(char[] string,
int ps,
char[] pattern,
int pp)