Android Open Source - permissions Application Info Comparator






From Project

Back to project page permissions.

License

The source code is released under:

MIT License

If you think the Android project permissions listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.

Java Source Code

package com.tellmas.android.permissions;
//from   w  w w.  j  a va 2  s . c om
import java.util.Comparator;

/**
 * Compares ApplicationInfo objects by ApplicationInfo.name
 *    using the String class's compareTo() method.
 */
public class ApplicationInfoComparator implements Comparator<ApplicationInfo> {

    /**
     * Compares ApplicationInfo objects by ApplicationInfo.name
     *
     * @param appInfo1 an ApplicationInfo object to compare
     * @param appInfo2 another ApplicationInfo object to compare to the first one
     * @return 0 if the strings are equal, a negative integer if the first string is before the second string, or a positive integer if the first string is after the second string
     */
    @Override
    public int compare(ApplicationInfo appInfo1, ApplicationInfo appInfo2) {
        return appInfo1.getName().compareTo(appInfo2.getName());
    }

}




Java Source Code List

com.tellmas.android.permissions.AppListExpandableListAdapter.java
com.tellmas.android.permissions.AppListFragment.java
com.tellmas.android.permissions.ApplicationInfoComparator.java
com.tellmas.android.permissions.ApplicationInfo.java
com.tellmas.android.permissions.GlobalDefines.java
com.tellmas.android.permissions.MainActivity.java
com.tellmas.android.permissions.PermListExpandableListAdapter.java
com.tellmas.android.permissions.PermListFragment.java
com.tellmas.android.permissions.PermissionInfoComparator.java
com.tellmas.android.permissions.PermissionInfo.java
com.tellmas.android.permissions.Permission.java