Subversion Repositories SmartDukaan

Rev

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

package com.amazonaws.mws.samples;

import java.util.Comparator;

public class SaleReportComparator implements Comparator<ItemSale> {

                public int compare(ItemSale  o1, ItemSale o2) {
                        if (o1.getProductGroup().compareTo(o2.getProductGroup()) < 0) {
                                return -1;
                        } else if (o1.getProductGroup().compareTo(o2.getProductGroup()) > 0) {
                                return 1;
                        }
                        return 0;
                }
        }