Move adsal into its own subdirectory.
[controller.git] / opendaylight / adsal / sal / api / src / main / java / org / opendaylight / controller / sal / core / SupportedBandwidth.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.XmlAccessType;
13 import javax.xml.bind.annotation.XmlAccessorType;
14 import javax.xml.bind.annotation.XmlRootElement;
15
16 /**
17  * @file   SupportedBandWidth.java
18  *
19  * @brief  Class representing supported bandwidth
20  *
21  * Describes Supported Bandwidth which could be of a link or whatever could have
22  * bandwidth as description. It's intended in multiple of bits per
23  * seconds.
24  */
25 @XmlRootElement
26 @XmlAccessorType(XmlAccessType.NONE)
27 public class SupportedBandwidth extends Bandwidth {
28         private static final long serialVersionUID = 1L;
29         public static final String SupportedBandwidthPropName = "supportedBandwidth";
30
31         public SupportedBandwidth(long value) {
32                 super(SupportedBandwidthPropName);
33                 this.bandwidthValue = value;
34         }
35
36         /*
37      * Private constructor used for JAXB mapping
38      */
39     private SupportedBandwidth() {
40         super(SupportedBandwidthPropName);
41                 this.bandwidthValue = 0;
42     }
43
44         public SupportedBandwidth clone() {
45                 return new SupportedBandwidth(this.bandwidthValue);
46     }
47
48     @Override
49     public String toString() {
50         StringBuffer sb = new StringBuffer();
51         sb.append("SupportedBandWidth[");
52         sb.append(super.toString());
53         sb.append("]");
54         return sb.toString();
55     }
56
57
58 }