當前位置: 首頁>>代碼示例>>Java>>正文


Java IOCase.equals方法代碼示例

本文整理匯總了Java中org.apache.commons.io.IOCase.equals方法的典型用法代碼示例。如果您正苦於以下問題:Java IOCase.equals方法的具體用法?Java IOCase.equals怎麽用?Java IOCase.equals使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在org.apache.commons.io.IOCase的用法示例。


在下文中一共展示了IOCase.equals方法的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: FileAlterationObserver

import org.apache.commons.io.IOCase; //導入方法依賴的package包/類
/**
 * Construct an observer for the specified directory, file filter and
 * file comparator.
 *
 * @param rootEntry the root directory to observe
 * @param fileFilter The file filter or null if none
 * @param caseSensitivity  what case sensitivity to use comparing file names, null means system sensitive
 */
protected FileAlterationObserver(FileEntry rootEntry, FileFilter fileFilter, IOCase caseSensitivity) {
    if (rootEntry == null) {
        throw new IllegalArgumentException("Root entry is missing");
    }
    if (rootEntry.getFile() == null) {
        throw new IllegalArgumentException("Root directory is missing");
    }
    this.rootEntry = rootEntry;
    this.fileFilter = fileFilter;
    if (caseSensitivity == null || caseSensitivity.equals(IOCase.SYSTEM)) {
        this.comparator = NameFileComparator.NAME_SYSTEM_COMPARATOR;
    } else if (caseSensitivity.equals(IOCase.INSENSITIVE)) {
        this.comparator = NameFileComparator.NAME_INSENSITIVE_COMPARATOR;
    } else {
        this.comparator = NameFileComparator.NAME_COMPARATOR;
    }
}
 
開發者ID:fesch,項目名稱:Moenagade,代碼行數:26,代碼來源:FileAlterationObserver.java

示例2: FileAlterationObserver

import org.apache.commons.io.IOCase; //導入方法依賴的package包/類
/**
 * Construct an observer for the specified directory, file filter and
 * file comparator.
 *
 * @param rootEntry the root directory to observe
 * @param fileFilter The file filter or null if none
 * @param caseSensitivity  what case sensitivity to use comparing file names, null means system sensitive
 */
protected FileAlterationObserver(final FileEntry rootEntry, final FileFilter fileFilter,
                                 final IOCase caseSensitivity) {
    if (rootEntry == null) {
        throw new IllegalArgumentException("Root entry is missing");
    }
    if (rootEntry.getFile() == null) {
        throw new IllegalArgumentException("Root directory is missing");
    }
    this.rootEntry = rootEntry;
    this.fileFilter = fileFilter;
    if (caseSensitivity == null || caseSensitivity.equals(IOCase.SYSTEM)) {
        this.comparator = NameFileComparator.NAME_SYSTEM_COMPARATOR;
    } else if (caseSensitivity.equals(IOCase.INSENSITIVE)) {
        this.comparator = NameFileComparator.NAME_INSENSITIVE_COMPARATOR;
    } else {
        this.comparator = NameFileComparator.NAME_COMPARATOR;
    }
}
 
開發者ID:PuppyRush,項目名稱:WidgetStore,代碼行數:27,代碼來源:FileAlterationObserver.java

示例3: FileAlterationObserver

import org.apache.commons.io.IOCase; //導入方法依賴的package包/類
/**
 * Construct an observer for the specified directory, file filter and
 * file comparator.
 *
 * @param rootEntry the root directory to observe
 * @param fileFilter The file filter or null if none
 * @param caseSensitivity  what case sensitivity to use comparing file names, null means system sensitive
 */
protected FileAlterationObserver(FileEntry rootEntry, FileFilter fileFilter, IOCase caseSensitivity, boolean circulate) {
    if (rootEntry == null) {
        throw new IllegalArgumentException("Root entry is missing");
    }
    if (rootEntry.getFile() == null) {
        throw new IllegalArgumentException("Root directory is missing");
    }
    this.rootEntry = rootEntry;
    this.fileFilter = fileFilter;
    this.circulate = circulate;
    if (caseSensitivity == null || caseSensitivity.equals(IOCase.SYSTEM)) {
        this.comparator = NameFileComparator.NAME_SYSTEM_COMPARATOR;
    } else if (caseSensitivity.equals(IOCase.INSENSITIVE)) {
        this.comparator = NameFileComparator.NAME_INSENSITIVE_COMPARATOR;
    } else {
        this.comparator = NameFileComparator.NAME_COMPARATOR;
    }
}
 
開發者ID:Jakegogo,項目名稱:concurrent,代碼行數:27,代碼來源:FileAlterationObserver.java

示例4: matches

import org.apache.commons.io.IOCase; //導入方法依賴的package包/類
@Override
public boolean matches(Object argument) {
	if (argument instanceof NameFileFilter) {
		String[] names = Whitebox.getInternalState(argument, String[].class);
		IOCase caseSensitivity = Whitebox.getInternalState(argument, IOCase.class);
		return Arrays.equals(names, new String[]{METADATA_DIRECTORY})
			&& caseSensitivity.equals(IOCase.SENSITIVE);
	}
	return false;
}
 
開發者ID:mezuro,項目名稱:kalibro,代碼行數:11,代碼來源:RepositoryLoaderTest.java


注:本文中的org.apache.commons.io.IOCase.equals方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。