Use version 13.1.0 of openroadm-service models
[transportpce.git] / common / src / main / java / org / opendaylight / transportpce / common / catalog / PenaltiesComparator.java
1 /*
2  * Copyright © 2022 Orange, Inc. and others.  All rights reserved.
3  *
4  * This program and the accompanying materials are made available under the
5  * terms of the Eclipse Public License v1.0 which accompanies this distribution,
6  * and is available at http://www.eclipse.org/legal/epl-v10.html
7  */
8 package org.opendaylight.transportpce.common.catalog;
9
10 import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
11 import java.io.Serializable;
12 import java.util.Comparator;
13 import org.opendaylight.yang.gen.v1.http.org.openroadm.operational.mode.catalog.rev230526.operational.mode.transponder.parameters.Penalties;
14
15 @SuppressWarnings("serial")
16 @SuppressFBWarnings(
17     value = "SE_NO_SERIALVERSIONID",
18     justification = "https://github.com/rzwitserloot/lombok/wiki/WHY-NOT:-serialVersionUID")
19 public class PenaltiesComparator implements Comparator<Penalties>, Serializable {
20     @Override
21     public int compare(Penalties o1, Penalties o2) {
22         return Double.compare(o1.getUpToBoundary().doubleValue(), o2.getUpToBoundary().doubleValue());
23     }
24 }