com.elasticpath.domain.misc.impl
Class DisplayNameComparatorImpl

java.lang.Object
  extended by com.elasticpath.domain.misc.impl.DisplayNameComparatorImpl
All Implemented Interfaces:
DisplayNameComparator, java.io.Serializable, java.util.Comparator

public class DisplayNameComparatorImpl
extends java.lang.Object
implements DisplayNameComparator

This is a default implementation of DisplayNameComparator.

See Also:
Serialized Form

Field Summary
static long serialVersionUID
          Serial version id.
 
Constructor Summary
DisplayNameComparatorImpl()
           
 
Method Summary
 int compare(java.lang.Object object1, java.lang.Object object2)
          Compares its two arguments for order.
 void initialize(java.util.Locale locale)
          Intialize the comparator with the given locale.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface java.util.Comparator
equals
 

Field Detail

serialVersionUID

public static final long serialVersionUID
Serial version id.

See Also:
Constant Field Values
Constructor Detail

DisplayNameComparatorImpl

public DisplayNameComparatorImpl()
Method Detail

compare

public int compare(java.lang.Object object1,
                   java.lang.Object object2)
Compares its two arguments for order. Returns a negative integer, zero, or a positive integer as the first argument is less than, equal to, or greater than the second.

Specified by:
compare in interface java.util.Comparator
Parameters:
object1 - the first object to be compared.
object2 - the second object to be compared.
Returns:
a negative integer, zero, or a positive integer as the first argument is less than, equal to, or greater than the second.
Throws:
java.lang.ClassCastException - if the arguments' types prevent them from being compared by this Comparator.

initialize

public void initialize(java.util.Locale locale)
Intialize the comparator with the given locale.

Specified by:
initialize in interface DisplayNameComparator
Parameters:
locale - the locale