com.ibm.commerce.order.calculation
Class CodeComparator

java.lang.Object
  com.ibm.commerce.order.calculation.CodeComparator
All Implemented Interfaces:
java.util.Comparator

public class CodeComparator
extends java.lang.Object
implements java.util.Comparator

A comparator class for ordering calculation codes. Calculation codes are order by the following:

  1. sequence (ascending).
  2. calculation code ID (ascending).

Field Summary
static java.lang.String COPYRIGHT
The IBM copyright notice field.
Constructor Summary
CodeComparator()
Constructor for CodeComparator.
Method Summary
int compare(java.lang.Object aObj1, java.lang.Object aObj2)
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
Field Detail

COPYRIGHT

public static final java.lang.String COPYRIGHT
The IBM copyright notice field.
See Also:
Constant Field Values
Constructor Detail

CodeComparator

public CodeComparator()
Constructor for CodeComparator.
Method Detail

compare

public int compare(java.lang.Object aObj1,
                   java.lang.Object aObj2)
Specified by:
compare in interface java.util.Comparator
Parameters:
aObj1 - the first calculation code.
aObj2 - the second calculation code.
Returns:
the result of the comparision.
See Also:
Comparator.compare(Object, Object)

Feedback