@Test public void testCompareFirst() { assertEquals(0, new SizeComparator(true).compareFirst(new Path("/a", EnumSet.of(Path.Type.file)), new Path("/b", EnumSet.of(Path.Type.file)))); }
@Override protected int compareFirst(final Path p1, final Path p2) { if(p1.attributes().getSize() > p2.attributes().getSize()) { return ascending ? 1 : -1; } else if(p1.attributes().getSize() < p2.attributes().getSize()) { return ascending ? -1 : 1; } return 0; }
SizeComparator extends BrowserComparator { @Override protected int compareFirst(final Path p1, final Path p2) { if(p1.attributes().getSize() > p2.attributes().getSize()) { return ascending ? 1 : -1; } else if(p1.attributes().getSize() < p2.attributes().getSize()) { return ascending ? -1 : 1; } return 0; } }
SizeComparator extends BrowserComparator { @Override protected int compareFirst(final Path p1, final Path p2) { if(p1.attributes().getSize() > p2.attributes().getSize()) { return ascending ? 1 : -1; } else if(p1.attributes().getSize() < p2.attributes().getSize()) { return ascending ? -1 : 1; } return 0; } SizeComparator(boolean ascending); }
SizeComparator extends BrowserComparator { @Override protected int compareFirst(final Path p1, final Path p2) { if(p1.attributes().getSize() > p2.attributes().getSize()) { return ascending ? 1 : -1; } else if(p1.attributes().getSize() < p2.attributes().getSize()) { return ascending ? -1 : 1; } return 0; } SizeComparator(boolean ascending);  }
SizeComparator extends BrowserComparator { @Override protected int compareFirst(final Path p1, final Path p2) { if(p1.attributes().getSize() > p2.attributes().getSize()) { return ascending ? 1 : -1; } else if(p1.attributes().getSize() < p2.attributes().getSize()) { return ascending ? -1 : 1; } return 0; } SizeComparator(boolean ascending);   }