org.lsc.utils
Class StringLengthComparator
java.lang.Object
org.lsc.utils.StringLengthComparator
- All Implemented Interfaces:
- Serializable, Comparator<String>
public class StringLengthComparator
- extends Object
- implements Comparator<String>, Serializable
- See Also:
- Serialized Form
|
Method Summary |
int |
compare(String arg0,
String arg1)
This function actually compares String lengths
so that they are sorted from longest to shortest |
StringLengthComparator
public StringLengthComparator()
compare
public int compare(String arg0,
String arg1)
- This function actually compares String lengths
so that they are sorted from longest to shortest
- Specified by:
compare in interface Comparator<String>
- Parameters:
arg0 - First stringarg1 - Second string
- Returns:
- int To order strings by length
Copyright © 2005-2010 LSC project. All Rights Reserved.