lazyj.mail.comparators
Class SizeComparator

java.lang.Object
  extended by lazyj.mail.comparators.SizeComparator
All Implemented Interfaces:
java.io.Serializable, java.util.Comparator<MailHeader>

public class SizeComparator
extends java.lang.Object
implements java.util.Comparator<MailHeader>, java.io.Serializable

A MailHeader comparator that sorts the mails by the size.

Since:
2006-10-13
Author:
costing
See Also:
Serialized Form

Constructor Summary
SizeComparator()
           
 
Method Summary
 int compare(MailHeader o1, MailHeader o2)
          Sorting method : by the size of the mail
 
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

SizeComparator

public SizeComparator()
Method Detail

compare

public int compare(MailHeader o1,
                   MailHeader o2)
Sorting method : by the size of the mail

Specified by:
compare in interface java.util.Comparator<MailHeader>
Parameters:
o1 - first mail
o2 - second mail
Returns:
difference between the mail sizes