wildcardmatcher.java
来自「dgbas公文管理核心java源码」· Java 代码 · 共 44 行
JAVA
44 行
package com.jestdoc.inc;
/**
* <pre>
* This class if part of my toolkit package.
*
* This class provides a method for the programmar to test whether a file matches a wildcard.
*
* For he who is familiar with dos, he will probably refer to files using wildcard, that is file names
* like "*.bat","a?b.*",etc, this class gives you a method to test if they are match.
*
* A "*" can match any length of string including an empty string,
* A "?" can match any single char.
*
* So
* "abc" & "a*" matches
* "abc" & "*" matches
* "abc" & "b*" doesn't match
* "abcd" & "a*d" matches
* "abcd" & "a??d" matches
* ......
*
* Title: 硄皌才ㄏノ
* Description:
* Copyright: Copyright (c) 2003
* Company: wingroup
* @author jarrywen
* @version 1.0
*/
public class WildcardMatcher {
/**
* Tag to indicate if the strings should be compared case sensitive or not.
*/
private static boolean ignoreCase=false;
/**
* Empty construct, since all the methods are static, you don't have to make an object of this class,
* and thus I hide the construtor in private.
*/
public WildcardMatcher() {}
/**
* ㄧ计
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?