|
Copyright © 2006 BEA Systems, Inc. All Rights Reserved | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.beasys.commerce.util.GlobHelper
GlobHelper
@Deprecated public class GlobHelper
A utility class for doing DOS-style pattern matching (GLOBing).
This supports only '?
' and '*
' pattern
characters. No bounded (e.g. "[abcd] file
") patterns are
supported.
To do a simple pattern match, you can use the matches
class method. Additionally, GlobHelper is a FilenameFilter
.
This requires the OROMatcher regular expression libraries, which are bundled with WebLogic Server.
Field Summary | |
---|---|
protected List |
patterns
Deprecated See BEA Commerce product offering |
Constructor Summary | |
---|---|
GlobHelper()
Deprecated See BEA Commerce product offering |
|
GlobHelper(Collection c)
Deprecated See BEA Commerce product offering |
|
GlobHelper(Iterator i)
Deprecated See BEA Commerce product offering |
|
GlobHelper(String pattern)
Deprecated See BEA Commerce product offering |
|
GlobHelper(String[] patterns)
Deprecated See BEA Commerce product offering |
Method Summary | |
---|---|
boolean |
accept(File dir,
String name)
Deprecated See BEA Commerce product offering |
void |
addPattern(String pat)
Deprecated See BEA Commerce product offering |
static com.oroinc.text.regex.Pattern |
getPattern(String patStr)
Deprecated See BEA Commerce product offering |
List |
getPatterns()
Deprecated See BEA Commerce product offering |
static boolean |
matches(String patStr,
String str)
Deprecated See BEA Commerce product offering |
boolean |
removePattern(String pat)
Deprecated See BEA Commerce product offering |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected List patterns
Constructor Detail |
---|
public GlobHelper()
public GlobHelper(String pattern)
public GlobHelper(String[] patterns)
public GlobHelper(Collection c)
public GlobHelper(Iterator i)
Method Detail |
---|
public void addPattern(String pat)
public boolean removePattern(String pat)
public List getPatterns()
public boolean accept(File dir, String name)
accept
in interface FilenameFilter
public static boolean matches(String patStr, String str) throws IllegalArgumentException
pat
- the pattern (e.g. "Some*Cl?.java
").str
- the input string.
IllegalArgumentException
- thrown on a bad pattern string.public static com.oroinc.text.regex.Pattern getPattern(String patStr) throws com.oroinc.text.regex.MalformedPatternException
By using a sort reference map, the garbage collector can clean it out as needed because we can always recreate the Pattern objects from the strings.
com.oroinc.text.regex.MalformedPatternException
- thrown on a
bad pattern string
|
Copyright © 2006 BEA Systems, Inc. All Rights Reserved | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |