Example usage for org.apache.commons.io IOCase isCaseSensitive

List of usage examples for org.apache.commons.io IOCase isCaseSensitive

Introduction

In this page you can find the example usage for org.apache.commons.io IOCase isCaseSensitive.

Prototype

public boolean isCaseSensitive() 

Source Link

Document

Does the object represent case sensitive comparison.

Usage

From source file:com.redhat.utils.RegexFullPathnameFileFilter.java

public RegexFullPathnameFileFilter(final String pattern, final IOCase caseSensitivity) {
    if (pattern == null) {
        throw new IllegalArgumentException("Pattern is missing");
    }//from  w  w  w. j  ava2s . c o m
    int flags = 0;
    if (caseSensitivity != null && !caseSensitivity.isCaseSensitive()) {
        flags = Pattern.CASE_INSENSITIVE;
    }
    this.pattern = Pattern.compile(pattern, flags);
}

From source file:org.cleartk.util.cr.RegexFileFilter.java

/**
 * Construct a new regular expression filter with the specified flags case sensitivity.
 * /* w w w  . ja  v  a2  s  .co m*/
 * @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);
}