info.magnolia.cms.util
Class StringLengthComparator

java.lang.Object
  extended by info.magnolia.cms.util.StringLengthComparator
All Implemented Interfaces:
Comparator<String>

public class StringLengthComparator
extends Object
implements Comparator<String>

A simple comparator that compares to String lengths. Shortest gets first.

Version:
$Revision: $ ($Author: $)
Author:
gjoseph

Constructor Summary
StringLengthComparator()
           
 
Method Summary
 int compare(String name1, String name2)
           
 
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

StringLengthComparator

public StringLengthComparator()
Method Detail

compare

public int compare(String name1,
                   String name2)
Specified by:
compare in interface Comparator<String>


Copyright © 2003-2012 Magnolia International Ltd.. All Rights Reserved.