Back to project page RealtimeStorage-Android.
The source code is released under:
MIT License
If you think the Android project RealtimeStorage-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.
package co.realtime.storage; /* ww w . j a va 2s .co m*/ import java.util.Comparator; import java.util.LinkedHashMap; class LHMItemsComparator implements Comparator<LinkedHashMap<String, ItemAttribute>> { String primaryKey; public LHMItemsComparator(String primaryKey){ this.primaryKey = primaryKey; } @Override public int compare(LinkedHashMap<String, ItemAttribute> lhm1, LinkedHashMap<String, ItemAttribute> lhm2) { ItemAttribute si1 = lhm1.get(this.primaryKey); ItemAttribute si2 = lhm2.get(this.primaryKey); return si1.compareTo(si2); } }