FileDocCategorySizeDatePackage
ComparePkgPdiffs.javaAPI DocAndroid 1.5 API642Wed May 06 22:41:22 BST 2009jdiff

ComparePkgPdiffs

public class ComparePkgPdiffs extends Object implements Comparator
Class to compare two PackageDiff objects. See the file LICENSE.txt for copyright details.
author
Matthew Doar, mdoar@pobox.com

Fields Summary
Constructors Summary
Methods Summary
public intcompare(java.lang.Object obj1, java.lang.Object obj2)
Compare two package diffs by their percentage difference, and then by name.

        PackageDiff p1 = (PackageDiff)obj1;
        PackageDiff p2 = (PackageDiff)obj2;
        if (p1.pdiff < p2.pdiff)
            return 1;
        if (p1.pdiff > p2.pdiff)
            return -1;
        return p1.name_.compareTo(p2.name_);