com.elasticpath.domain.misc.impl
Class RegionCodeComparatorImpl
java.lang.Object
com.elasticpath.domain.misc.impl.RegionCodeComparatorImpl
- All Implemented Interfaces:
- java.io.Serializable, java.util.Comparator
public class RegionCodeComparatorImpl
- extends java.lang.Object
- implements java.util.Comparator, java.io.Serializable
This is a comparator to used for Region
. The comparasion will be based on the result of countryCode comparasion, plus the result
of subCountryCode comparasion if the countryCode are the same.
- See Also:
- Serialized Form
Method Summary |
int |
compare(java.lang.Object obj1,
java.lang.Object obj2)
Compares its two arguments for order. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface java.util.Comparator |
equals |
serialVersionUID
public static final long serialVersionUID
- Serial version id.
- See Also:
- Constant Field Values
RegionCodeComparatorImpl
public RegionCodeComparatorImpl()
compare
public int compare(java.lang.Object obj1,
java.lang.Object obj2)
- 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:
obj1
- the first object to be compared.obj2
- 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.
EpSystemException
- if the property to be used for comparasion is null.