|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.digitalsanctuary.atg.util.StringLengthReverseComparator
This comparator can be used to Sort Strings based on their length. If used for sorting a collection of Strings it will order them from longest to shortest. Note: this comparator imposes orderings that are inconsistent with equals.
Constructor Summary | |
StringLengthReverseComparator()
|
Method Summary | |
int |
compare(java.lang.Object pStringOne,
java.lang.Object pStringTwo)
This comparator can be used to Sort Strings based on their length. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface java.util.Comparator |
equals |
Constructor Detail |
public StringLengthReverseComparator()
Method Detail |
public int compare(java.lang.Object pStringOne, java.lang.Object pStringTwo)
compare
in interface java.util.Comparator
pStringOne
- the first String to Compare.pStringTwo
- the second String to Compare.
java.lang.ClassCastException
- if either argument cannot be cast to a String.Comparator.compare(java.lang.Object, java.lang.Object)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |