2 * Copyright (c) 2013 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
8 package org.opendaylight.protocol.bgp.rib.impl;
10 import java.util.Comparator;
12 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.message.rev130918.PathAttributes;
16 * This comparator is intended to implement BGP Best Path Selection algorithm, as described at
18 * @see http://www.cisco.com/en/US/tech/tk365/technologies_tech_note09186a0080094431.shtml
20 * @param <T> Actual object state reference
22 final class BGPObjectComparator implements Comparator<PathAttributes> {
23 public static final BGPObjectComparator INSTANCE = new BGPObjectComparator();
25 private BGPObjectComparator() {
29 public int compare(final PathAttributes o1, final PathAttributes o2) {
40 // FIXME: look at ASPath
41 // FIXME: look at everything else :-)