Back to project page FindYourWords.
The source code is released under:
Apache License
If you think the Android project FindYourWords listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
/** * CompareStringList is a class that implements Comparator to compare two String and return * if the length is equals, more o less length. * //from w w w . ja va 2 s. c o m * @author Sara Craba * @version 1.0 */ package word; import java.util.Comparator; public class CompareStringList implements Comparator<String> { public int compare(String o1, String o2) { if (o1.length() > o2.length()) { return -1; } else if (o1.length() < o2.length()) { return 1; } else { return 0; } } }