本文整理匯總了Java中org.apache.commons.io.IOCase.isCaseSensitive方法的典型用法代碼示例。如果您正苦於以下問題:Java IOCase.isCaseSensitive方法的具體用法?Java IOCase.isCaseSensitive怎麽用?Java IOCase.isCaseSensitive使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類org.apache.commons.io.IOCase
的用法示例。
在下文中一共展示了IOCase.isCaseSensitive方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: RegexFileFilter
import org.apache.commons.io.IOCase; //導入方法依賴的package包/類
/**
* Construct a new regular expression filter with the specified flags case sensitivity.
*
* @param pattern regular string expression to match
* @param caseSensitivity how to handle case sensitivity, null means case-sensitive
* @throws IllegalArgumentException if the pattern is null
*/
public RegexFileFilter(String pattern, IOCase caseSensitivity) {
if (pattern == null) {
throw new IllegalArgumentException("Pattern is missing");
}
int flags = 0;
if (caseSensitivity != null && !caseSensitivity.isCaseSensitive()) {
flags = Pattern.CASE_INSENSITIVE;
}
this.pattern = Pattern.compile(pattern, flags);
}
示例2: RegexFileFilter
import org.apache.commons.io.IOCase; //導入方法依賴的package包/類
/**
* Construct a new regular expression filter with the specified flags case sensitivity.
*
* @param pattern regular string expression to match
* @param caseSensitivity how to handle case sensitivity, null means case-sensitive
* @throws IllegalArgumentException if the pattern is null
*/
public RegexFileFilter(final String pattern, final IOCase caseSensitivity) {
if (pattern == null) {
throw new IllegalArgumentException("Pattern is missing");
}
int flags = 0;
if (caseSensitivity != null && !caseSensitivity.isCaseSensitive()) {
flags = Pattern.CASE_INSENSITIVE;
}
this.pattern = Pattern.compile(pattern, flags);
}
示例3: RegexFileFilter
import org.apache.commons.io.IOCase; //導入方法依賴的package包/類
/**
* Construct a new regular expression filter with the specified flags case sensitivity.
*
* @param pattern
* regular string expression to match
* @param caseSensitivity
* how to handle case sensitivity, null means case-sensitive
* @throws IllegalArgumentException
* if the pattern is null
*/
public RegexFileFilter(String pattern, IOCase caseSensitivity) {
if (pattern == null) {
throw new IllegalArgumentException("Pattern is missing");
}
int flags = 0;
if (caseSensitivity != null && !caseSensitivity.isCaseSensitive()) {
flags = Pattern.CASE_INSENSITIVE;
}
this.pattern = Pattern.compile(pattern, flags);
}