package ru.yandex.autotests.directapi.matchers.comporators;

import java.util.Comparator;

import ru.yandex.autotests.directapi.common.api4.RegionInfo;

/**
 * Created by IntelliJ IDEA.
 * User: mariabye
 * Date: 04.02.12
 * Time: 12:48
 * To change this template use File | Settings | File Templates.
 */
public class RegionInfoComparator implements Comparator<RegionInfo> {

    @Override
    public int compare(RegionInfo o1, RegionInfo o2) {
        if (o1.getRegionID() == o2.getRegionID()) {
            return 1;
        } else if (o1.getRegionID() < o2.getRegionID()) {
            return -1;
        } else {
            return 1;
        }
    }
}
