class LocalPriorityComparator implements Comparator<Local> {

    @Override
    public int compare(final Local o1, final Local o2) {
        if(o1.isDirectory() && o2.isDirectory()) {
            return 0;
        }
        if(o1.isFile() && o2.isFile()) {
            return 0;
        }
        if(o1.isDirectory()) {
            return -1;
        }
        if(o2.isDirectory()) {
            return 1;
        }
        return 0;
    }

}