Subversion Repositories SmartDukaan

Rev

Rev 11947 | Blame | Compare with Previous | Last modification | View Log | RSS feed

package in.shop2020;

import inventory.NlcLeftOutInventory;

import java.util.Comparator;

public class NlcLeftOutInventoryComparator implements Comparator<NlcLeftOutInventory> {

        @Override
        public int compare(NlcLeftOutInventory o1, NlcLeftOutInventory o2) {
                if (new Long(o1.getVendorAvailability()).compareTo(new Long(o2.getVendorAvailability())) < 0) {
                        return 1;
                } else if (new Long(o1.getVendorAvailability()).compareTo(new Long(o2.getVendorAvailability())) > 0) {
                        return -1;
                }
                return 0;
        }
        
}