Пример #1
0
 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);
 }
Пример #2
0
 public boolean exceedsThreshold(SnapshotShallow total, double threshold) {
   return exceeds(threshold, getTotalCount(), total.getTotalCount())
       || exceeds(threshold, getSize(), total.getSize());
 }