public int compare(SnapshotShallow o1, SnapshotShallow o2) { if (o2.getTotalCount() > o1.getTotalCount()) return 1; if (o2.getTotalCount() < o1.getTotalCount()) return -1; return o1.name.compareTo(o2.name); }
public boolean exceedsThreshold(SnapshotShallow total, double threshold) { return exceeds(threshold, getTotalCount(), total.getTotalCount()) || exceeds(threshold, getSize(), total.getSize()); }