@Test public void testCompareFirst() { assertEquals(0, new FilenameComparator(true).compareFirst(new Path("/a", EnumSet.of(Path.Type.file)), new Path("/a", EnumSet.of(Path.Type.file)))); assertEquals(0, new FilenameComparator(true).compareFirst(new Path("/a", EnumSet.of(Path.Type.file)), new Path("/a", EnumSet.of(Path.Type.directory)))); assertEquals(-1, new FilenameComparator(true).compareFirst(new Path("/a", EnumSet.of(Path.Type.file)), new Path("/b", EnumSet.of(Path.Type.directory)))); assertEquals(1, new FilenameComparator(true).compareFirst(new Path("/b", EnumSet.of(Path.Type.file)), new Path("/a", EnumSet.of(Path.Type.directory)))); }
@Override protected int compareFirst(final Path p1, final Path p2) { if(ascending) { return impl.compare(p1.getName(), p2.getName()); } return -impl.compare(p1.getName(), p2.getName()); }
FilenameComparator extends BrowserComparator { @Override protected int compareFirst(final Path p1, final Path p2) { if(ascending) { return impl.compare(p1.getName(), p2.getName()); } return -impl.compare(p1.getName(), p2.getName()); } }
FilenameComparator extends BrowserComparator { @Override protected int compareFirst(final Path p1, final Path p2) { if(ascending) { return impl.compare(p1.getName(), p2.getName()); } return -impl.compare(p1.getName(), p2.getName()); } FilenameComparator(boolean ascending); }
FilenameComparator extends BrowserComparator { @Override protected int compareFirst(final Path p1, final Path p2) { if(ascending) { return impl.compare(p1.getName(), p2.getName()); } return -impl.compare(p1.getName(), p2.getName()); } FilenameComparator(boolean ascending);  }
FilenameComparator extends BrowserComparator { @Override protected int compareFirst(final Path p1, final Path p2) { if(ascending) { return impl.compare(p1.getName(), p2.getName()); } return -impl.compare(p1.getName(), p2.getName()); } FilenameComparator(boolean ascending);   }