inputs.size() > 0 && inputs.size() <= SORT_FACTOR); assertTrue("Inputs to be merged were not sorted according to size: ", inputs.get(j).getCompressedSize() >= inputs.get(j-1).getCompressedSize());
@Override public int compareTo(Object obj) { if(obj instanceof CompressAwarePath) { CompressAwarePath compPath = (CompressAwarePath) obj; if(this.compressedSize < compPath.getCompressedSize()) { return -1; } else if (this.getCompressedSize() > compPath.getCompressedSize()) { return 1; } // Not returning 0 here so that objects with the same size (but // different paths) are still added to the TreeSet. } return super.compareTo(obj); } }
@Override public int compareTo(Object obj) { if(obj instanceof CompressAwarePath) { CompressAwarePath compPath = (CompressAwarePath) obj; if(this.compressedSize < compPath.getCompressedSize()) { return -1; } else if (this.getCompressedSize() > compPath.getCompressedSize()) { return 1; } // Not returning 0 here so that objects with the same size (but // different paths) are still added to the TreeSet. } return super.compareTo(obj); } }
@Override public int compareTo(Object obj) { if(obj instanceof CompressAwarePath) { CompressAwarePath compPath = (CompressAwarePath) obj; if(this.compressedSize < compPath.getCompressedSize()) { return -1; } else if (this.getCompressedSize() > compPath.getCompressedSize()) { return 1; } // Not returning 0 here so that objects with the same size (but // different paths) are still added to the TreeSet. } return super.compareTo(obj); } }
@Override public int compareTo(Object obj) { if(obj instanceof CompressAwarePath) { CompressAwarePath compPath = (CompressAwarePath) obj; if(this.compressedSize < compPath.getCompressedSize()) { return -1; } else if (this.getCompressedSize() > compPath.getCompressedSize()) { return 1; } // Not returning 0 here so that objects with the same size (but // different paths) are still added to the TreeSet. } return super.compareTo(obj); } }