2 * Copyright (c) 2014 Cisco Systems, Inc. and others. All rights reserved.
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
9 package org.opendaylight.groupbasedpolicy.renderer.ofoverlay.flow;
11 import java.util.Comparator;
13 import org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.list.Action;
15 import com.google.common.collect.ComparisonChain;
16 import com.google.common.collect.Ordering;
18 public class ActionComparator implements Comparator<Action> {
19 public static final ActionComparator INSTANCE = new ActionComparator();
22 public int compare(Action arg0, Action arg1) {
23 return ComparisonChain.start()
24 .compare(arg0.getOrder(), arg1.getOrder(),
25 Ordering.natural().nullsLast())