org.opencms.gwt.shared.sort
Class CmsComparatorType

java.lang.Object
  extended by org.opencms.gwt.shared.sort.CmsComparatorType
All Implemented Interfaces:
java.util.Comparator<I_CmsHasType>

public class CmsComparatorType
extends java.lang.Object
implements java.util.Comparator<I_CmsHasType>

Comparator for objects with a type property.

Since:
8.0.0
See Also:
I_CmsHasType

Constructor Summary
CmsComparatorType(boolean ascending)
          Constructor.
 
Method Summary
 int compare(I_CmsHasType o1, I_CmsHasType o2)
           
 
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

CmsComparatorType

public CmsComparatorType(boolean ascending)
Constructor.

Parameters:
ascending - if true order is ascending
Method Detail

compare

public int compare(I_CmsHasType o1,
                   I_CmsHasType o2)
Specified by:
compare in interface java.util.Comparator<I_CmsHasType>
See Also:
Comparator.compare(java.lang.Object, java.lang.Object)