Rev 11947 |
Details |
Compare with Previous |
Last modification |
View Log
| RSS feed
| Rev |
Author |
Line No. |
Line |
| 11940 |
manish.sha |
1 |
package in.shop2020;
|
|
|
2 |
|
|
|
3 |
import inventory.NlcLeftOutInventory;
|
|
|
4 |
|
|
|
5 |
import java.util.Comparator;
|
|
|
6 |
|
|
|
7 |
public class NlcLeftOutInventoryComparator implements Comparator<NlcLeftOutInventory> {
|
|
|
8 |
|
|
|
9 |
@Override
|
|
|
10 |
public int compare(NlcLeftOutInventory o1, NlcLeftOutInventory o2) {
|
| 11947 |
manish.sha |
11 |
if (new Long(o1.getVendorAvailability()).compareTo(new Long(o2.getVendorAvailability())) < 0) {
|
| 11948 |
manish.sha |
12 |
return 1;
|
|
|
13 |
} else if (new Long(o1.getVendorAvailability()).compareTo(new Long(o2.getVendorAvailability())) > 0) {
|
| 11940 |
manish.sha |
14 |
return -1;
|
|
|
15 |
}
|
|
|
16 |
return 0;
|
|
|
17 |
}
|
|
|
18 |
|
|
|
19 |
}
|