class FileComparator implements Comparator<AbstractFile> {

    public boolean equals(Object o) {
        if(! (o instanceof FileComparator))
            return false;

        FileComparator fc = (FileComparator)o;
        return criterion ==fc.criterion && ascending==fc.ascending;
    }

    public  FileComparator(int criterion, boolean ascending, boolean directoriesFirst, Function<AbstractFile, String> nameFunc);

}