Android Open Source - storage-android Person Comparator






From Project

Back to project page storage-android.

License

The source code is released under:

MIT License

If you think the Android project storage-android 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.contexthub.storageapp.models;
//  ww  w.ja  v a  2s  .com
import com.chaione.contexthub.sdk.model.VaultDocument;

import java.util.Comparator;

/**
 * Created by andy on 10/20/14.
 */
public class PersonComparator implements Comparator<VaultDocument<Person>> {

    @Override
    public int compare(VaultDocument<Person> personVaultDocument, VaultDocument<Person> personVaultDocument2) {
        return personVaultDocument.getDataObject().getName().toLowerCase().compareTo(
                personVaultDocument2.getDataObject().getName().toLowerCase());
    }
}




Java Source Code List

com.contexthub.storageapp.ApplicationTest.java
com.contexthub.storageapp.MainActivity.java
com.contexthub.storageapp.StorageApp.java
com.contexthub.storageapp.fragments.AboutFragment.java
com.contexthub.storageapp.fragments.EditVaultItemFragment.java
com.contexthub.storageapp.fragments.VaultItemListFragment.java
com.contexthub.storageapp.models.PersonComparator.java
com.contexthub.storageapp.models.Person.java