2 * Copyright (c) 2015 Huawei, Inc. and others. All rights reserved.
\r
4 * This program and the accompanying materials are made available under the
\r
5 * terms of the Eclipse Public License v1.0 which accompanies this distribution,
\r
6 * and is available at http://www.eclipse.org/legal/epl-v10.html
\r
9 package org.opendaylight.nemo.intent.algorithm;
\r
12 * An edge in the network topology.
\r
14 * @author Zhigang Ji
\r
19 private String dest;
\r
20 private long metric;
\r
21 private long bandwidth;
\r
23 public Edge(String id, String src, String dest, long metric, long bandwidth) {
\r
29 this.metric = metric;
\r
30 this.bandwidth = bandwidth;
\r
35 public String getId() {
\r
39 public String getSrc() {
\r
43 public String getDest() {
\r
47 public long getMetric() {
\r
51 public long getBandwidth() {
\r
55 public void setMetric(long metric) {
\r
56 this.metric = metric;
\r
61 public void setBandwidth(long bandwidth) {
\r
62 this.bandwidth = bandwidth;
\r
68 public boolean equals(Object obj) {
\r
69 return ((Edge)obj).getId().equals(id);
\r
73 public String toString() {
\r
75 "id='" + id + '\'' +
\r
76 ", src='" + src + '\'' +
\r
77 ", dest='" + dest + '\'' +
\r
78 ", metric=" + metric +
\r
79 ", bandwidth=" + bandwidth +
\r