Rev 11947 |
Go to most recent revision |
Details |
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) {
|
|
|
11 |
if (o1.getVendorAvailability()+"".compareTo(o2.getVendorAvailability()+"") < 0) {
|
|
|
12 |
return -1;
|
|
|
13 |
} else if (o1.getVendorAvailability()+"".compareTo(o2.getVendorAvailability()+"") > 0) {
|
|
|
14 |
return 1;
|
|
|
15 |
}
|
|
|
16 |
return 0;
|
|
|
17 |
}
|
|
|
18 |
|
|
|
19 |
}
|