3 * Copyright (c) 2013 Cisco Systems, Inc. and others. All rights reserved.
5 * This program and the accompanying materials are made available under the
6 * terms of the Eclipse Public License v1.0 which accompanies this distribution,
7 * and is available at http://www.eclipse.org/legal/epl-v10.html
10 package org.opendaylight.controller.sal.core;
12 import javax.xml.bind.annotation.XmlRootElement;
14 import org.apache.commons.lang3.builder.EqualsBuilder;
15 import org.apache.commons.lang3.builder.HashCodeBuilder;
18 * @file PeerBandWidth.java
20 * @brief Class representing peer bandwidth
22 * Describes peer Bandwidth of peer element. It's intended in multiple of
26 public class PeerBandwidth extends Bandwidth {
27 private static final long serialVersionUID = 1L;
29 public static final String PeerBandwidthPropName = "peerBandwidth";
31 public PeerBandwidth(long value) {
32 super(PeerBandwidthPropName);
33 this.bandwidthValue = value;
37 * Private constructor used for JAXB mapping
39 private PeerBandwidth() {
40 super(PeerBandwidthPropName);
41 this.bandwidthValue = 0;
44 public PeerBandwidth clone() {
45 return new PeerBandwidth(this.bandwidthValue);
49 public int hashCode() {
50 return HashCodeBuilder.reflectionHashCode(this);
54 public boolean equals(Object obj) {
55 return EqualsBuilder.reflectionEquals(this, obj);
59 public String toString() {
60 StringBuffer sb = new StringBuffer();
61 sb.append("PeerBandWidth[");
62 sb.append(super.toString());