Package no.ugland.utransprod.service.impl

Source Code of no.ugland.utransprod.service.impl.ProduceableComparator

package no.ugland.utransprod.service.impl;

import java.util.Comparator;

import org.apache.commons.lang.builder.CompareToBuilder;

import no.ugland.utransprod.model.Produceable;

public class ProduceableComparator implements Comparator<Produceable> {

  public int compare(Produceable produceable1, Produceable produceable2) {
    return new CompareToBuilder().append(
        produceable1.getTransportYear(), produceable2.getTransportYear()).append(
            produceable1.getTransportWeek(), produceable2.getTransportWeek()).append(produceable1.getLoadingDate(), produceable2.getLoadingDate())
    .append(produceable1.getTransportDetails(), produceable2.getTransportDetails()).append(
        produceable1.getLoadTime(), produceable2.getLoadTime()).toComparison();
  }

}
TOP

Related Classes of no.ugland.utransprod.service.impl.ProduceableComparator

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.