Overview | Package | Class | Tree | Deprecated | Index | Help
| © 2002 BEA Systems, Inc.
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.beasys.commerce.util
Class GlobHelper

    java.lang.Object
      |
      +--com.beasys.commerce.util.GlobHelper

Deprecated. Use `GlobHelper`

public class GlobHelper
extends java.lang.Object
implements java.io.FilenameFilter

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.

Since:
  2.0

Field Summary
`protected java.util.List` | `patterns` Deprecated. Our list of file patterns to match.

Constructor Summary
`GlobHelper()` Deprecated. Constructor.
`GlobHelper(java.util.Collection c)` Deprecated. Constructor with patterns.
`GlobHelper(java.util.Iterator i)` Deprecated. Constructor with patterns.
`GlobHelper(java.lang.String pattern)` Deprecated. Constructor with pattern.
`GlobHelper(java.lang.String[] patterns)` Deprecated. Constructor with patterns.

Method Summary
`boolean` | `accept(java.io.File dir, java.lang.String name)` Deprecated. Tell if the specified directory and filename matches our current list patterns.
`void` | `addPattern(java.lang.String pat)` Deprecated. Add a pattern.
`static com.oroinc.text.regex.Pattern` | `getPattern(java.lang.String patStr)` Deprecated. Get a pattern from the pattern cache, which is a soft reference map of pattern string to Pattern.
`java.util.List` | `getPatterns()` Deprecated. Get the patterns.
`static boolean` | `matches(java.lang.String patStr, java.lang.String str)` Deprecated. Determine if the given input string matches the specified input pattern.
`boolean` | `removePattern(java.lang.String pat)` Deprecated. Remove a pattern.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### patterns

    protected java.util.List patterns

  Deprecated.
  Our list of file patterns to match.

Constructor Detail

### GlobHelper

    public GlobHelper()

  Deprecated.
  Constructor.

### GlobHelper

    public GlobHelper(java.lang.String pattern)

  Deprecated.
  Constructor with pattern.

### GlobHelper

    public GlobHelper(java.lang.String[] patterns)

  Deprecated.
  Constructor with patterns.

### GlobHelper

    public GlobHelper(java.util.Collection c)

  Deprecated.
  Constructor with patterns.

### GlobHelper

    public GlobHelper(java.util.Iterator i)

  Deprecated.
  Constructor with patterns.

Method Detail

### addPattern

    public void addPattern(java.lang.String pat)

  Deprecated.
  Add a pattern.

### removePattern

    public boolean removePattern(java.lang.String pat)

  Deprecated.
  Remove a pattern.

### getPatterns

    public java.util.List getPatterns()

  Deprecated.
  Get the patterns.

### accept

    public boolean accept(java.io.File dir,
                          java.lang.String name)

  Deprecated.
  Tell if the specified directory and filename matches our current list patterns.
  Specified by:
    accept in interface java.io.FilenameFilter

### matches

    public static boolean matches(java.lang.String patStr,
                                  java.lang.String str)
                           throws java.lang.IllegalArgumentException

  Deprecated.
  Determine if the given input string matches the specified input pattern.

  Parameters:
    `pat` - the pattern (e.g. "`Some*Cl?.java`").
    `str` - the input string.
  Returns:
    true if the input string matches the pattern, false if not
  Throws:
    java.lang.IllegalArgumentException - thrown on a bad pattern string.

### getPattern

    public static com.oroinc.text.regex.Pattern getPattern(java.lang.String patStr)
                                                    throws com.oroinc.text.regex.MalformedPatternException

  Deprecated.
  Get a pattern from the pattern cache, which is a soft reference map of pattern string to Pattern.

  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.

  Throws:
    com.oroinc.text.regex.MalformedPatternException - thrown on a bad pattern string

Overview | Package | Class | Tree | Deprecated | Index | Help
| © 2002 BEA Systems, Inc.
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2002 BEA Systems, Inc. All Rights Reserved