Großmarkt

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

Field Summary
static int BID
           
static int COUNT
           
static int OFFER
           
static boolean SINGLE
           
static boolean SUMMED
           
 
Constructor Summary
CmpNumbers(int chosen)
           
CmpNumbers(int chosen, boolean summed)
           
 
Method Summary
 int compare(Object o1, Object o2)
          The actual comparison.
 
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

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
Constructor Detail

CmpNumbers

public CmpNumbers(int chosen)
Parameters:
chosen -

CmpNumbers

public CmpNumbers(int chosen,
                  boolean summed)
Parameters:
chosen -
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
Method Detail

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.

Großmarkt