market.swing
Class CmpNumbers
java.lang.Object
|
+--market.swing.CmpNumbers
- All Implemented Interfaces:
- Comparator, Serializable
- public class CmpNumbers
- extends Object
- implements Comparator, Serializable
Compares CIArticles
by numbers.
- See Also:
- Serialized Form
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
BID
public static final int BID
- See Also:
- Constant Field Values
OFFER
public static final int OFFER
- See Also:
- Constant Field Values
COUNT
public static final int COUNT
- See Also:
- Constant Field Values
SUMMED
public static final boolean SUMMED
- See Also:
- Constant Field Values
SINGLE
public static final boolean SINGLE
- See Also:
- Constant Field Values
CmpNumbers
public CmpNumbers(int chosen)
- Parameters:
chosen
- - 0: CIArticles are compared by their bid
- 1: CIArticles are compared by their offer
- 2: CIArticles are compared by their amount
CmpNumbers
public CmpNumbers(int chosen,
boolean summed)
- Parameters:
chosen
- - 0: CIArticles are compared by their bid
- 1: CIArticles are compared by their offer
- 2: CIArticles are compared by their amount
summed
- Tells the comparator if value to be sorted has been multiplied with the amount
of items of a CountingStock or not. This depends, wether the corresponding table shows just the
single price of an Article or the summed up prize of a whole bunch of Articles of a kind.
This parameter only takes effect for CountingStockRecords
compare
public int compare(Object o1,
Object o2)
- The actual comparison.
- Specified by:
compare
in interface Comparator
- Parameters:
o1
- the first CIArticle.o2
- the second CIArticle.
- Returns:
- an int representing the result of the comparison.