Equals/HashCode/StringBuilder removal
[controller.git] / opendaylight / sal / api / src / main / java / org / opendaylight / controller / sal / core / AdvertisedBandwidth.java
1
2 /*
3  * Copyright (c) 2013 Cisco Systems, Inc. and others.  All rights reserved.
4  *
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
8  */
9
10 package org.opendaylight.controller.sal.core;
11
12 import javax.xml.bind.annotation.XmlRootElement;
13
14 /**
15  * @file   AdvertisedBandWidth.java
16  *
17  * @brief  Class representing advertised bandwidth
18  *
19  * Describes Advertised Bandwidth which could be of a link or whatever could have
20  * bandwidth as description. It's intended in multiple of bits per
21  * seconds.
22  */
23 @XmlRootElement
24 @SuppressWarnings("serial")
25 public class AdvertisedBandwidth extends Bandwidth {
26         public static final String AdvertisedBandwidthPropName = "advertisedBandwidth";
27         
28         public AdvertisedBandwidth(long value) {
29                 super(AdvertisedBandwidthPropName);
30                 this.bandwidthValue = value;
31         }
32         
33         /*
34      * Private constructor used for JAXB mapping
35      */
36     private AdvertisedBandwidth() {
37         super(AdvertisedBandwidthPropName);
38                 this.bandwidthValue = 0;
39     }
40         
41         public AdvertisedBandwidth clone() {
42                 return new AdvertisedBandwidth(this.bandwidthValue);  
43     }
44         
45     @Override
46     public String toString() {
47         StringBuffer sb = new StringBuffer();
48         sb.append("AdvertisedBandWidth[");
49         sb.append(super.toString());
50         sb.append("]");
51         return sb.toString();
52     }
53
54 }