|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.opensourcephysics.tools.minijar.Pattern
public class Pattern
Creates and uses a file matching pattern to locate files in a directory or in a compressed (ZIP or JAR) file. Patterns for files in compressed files are very simple. The search is true if the file name coincides with an entry in the compressed file. Patterns for regular files (in disk directories) can be more sophisticated by making use of a MAGIC (wild char) character.
Field Summary | |
---|---|
static java.lang.String |
DOUBLE_MAGIC
|
static java.lang.String |
MAGIC
|
Constructor Summary | |
---|---|
Pattern(java.io.File file)
Constructs a pattern consisting of a compressed ZIP or JAR file. |
|
Pattern(java.lang.String pattern)
Constructs a Pattern object for a given pattern. |
Method Summary | |
---|---|
boolean |
matches(java.lang.String filename)
Whether the given file name matches the pattern |
java.lang.String |
toString()
Prints a verbose description of the pattern |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String MAGIC
public static final java.lang.String DOUBLE_MAGIC
Constructor Detail |
---|
public Pattern(java.lang.String pattern)
pattern
- A String of any of the following forms:
public Pattern(java.io.File file)
file
- Method Detail |
---|
public java.lang.String toString()
toString
in class java.lang.Object
public boolean matches(java.lang.String filename)
filename
-
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |