com.mebigfatguy.tomailer
Class CssSelectorComparator

java.lang.Object
  extended by com.mebigfatguy.tomailer.CssSelectorComparator
All Implemented Interfaces:
java.io.Serializable, java.util.Comparator<CssItem>

public class CssSelectorComparator
extends java.lang.Object
implements java.util.Comparator<CssItem>, java.io.Serializable

a comparator that orders CssItems based on the selector Id selectors have highest priority, followed by class selectors, then path selectors, and finally single element selectors.

See Also:
Serialized Form

Constructor Summary
CssSelectorComparator()
           
 
Method Summary
 int compare(CssItem item1, CssItem item2)
          the main interface method of the comparator
 
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

CssSelectorComparator

public CssSelectorComparator()
Method Detail

compare

public int compare(CssItem item1,
                   CssItem item2)
the main interface method of the comparator

Specified by:
compare in interface java.util.Comparator<CssItem>
Parameters:
item1 - the first css item
item2 - the second css item
Returns:
how item1 compares to item2


Copyright © 2009 MeBigFatGuy.com. All Rights Reserved.