com.elasticpath.domain.misc.impl
Class ProductLowestPriceComparatorImpl
java.lang.Object
com.elasticpath.domain.misc.impl.ProductLowestPriceComparatorImpl
- All Implemented Interfaces:
- ProductLowestPriceComparator, java.io.Serializable, java.util.Comparator
public class ProductLowestPriceComparatorImpl
- extends java.lang.Object
- implements ProductLowestPriceComparator
This is a default implementation of ProductLowestPriceComparator
.
- See Also:
- Serialized Form
Method Summary |
int |
compare(java.lang.Object object1,
java.lang.Object object2)
Compares its two arguments for order. |
void |
initialize(java.util.Currency currency)
Intialize the comparaor with the given currency. |
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
ProductLowestPriceComparatorImpl
public ProductLowestPriceComparatorImpl()
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.Currency currency)
- Intialize the comparaor with the given currency.
- Specified by:
initialize
in interface ProductLowestPriceComparator
- Parameters:
currency
- the currency