net.sourceforge.java.util.io
Class FileUtils.FileNameComparator

java.lang.Object
  extended bynet.sourceforge.java.util.io.FileUtils.FileComparator
      extended bynet.sourceforge.java.util.io.FileUtils.FileNameComparator
All Implemented Interfaces:
Comparator
Enclosing class:
FileUtils

private static class FileUtils.FileNameComparator
extends FileUtils.FileComparator

Comparator to compare File objects based on their file name attributes.

Author:
Sebastian Machhausen

Field Summary
 
Fields inherited from class net.sourceforge.java.util.io.FileUtils.FileComparator
 
Constructor Summary
private FileUtils.FileNameComparator()
           
 
Method Summary
 int compare(File file1, File file2)
           Compares two objects.
 
Methods inherited from class net.sourceforge.java.util.io.FileUtils.FileComparator
compare, isAscending, setAscending
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface java.util.Comparator
equals
 

Constructor Detail

FileUtils.FileNameComparator

private FileUtils.FileNameComparator()
Method Detail

compare

public int compare(File file1,
                   File file2)

Compares two objects.

Overrides:
compare in class FileUtils.FileComparator
Parameters:
file1 - the first File object to compare
file2 - the second File object to compare
Returns:
a negative integer, zero, or a positive integer as the file name of the first argument is lexical less than, equal to, or greater than the second.