info.magnolia.cms.util
Class StringLengthComparator

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

public class StringLengthComparator
extends java.lang.Object
implements java.util.Comparator<java.lang.String>

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

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

Constructor Summary
StringLengthComparator()
           
 
Method Summary
 int compare(java.lang.String name1, java.lang.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(java.lang.String name1,
                   java.lang.String name2)
Specified by:
compare in interface java.util.Comparator<java.lang.String>


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