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.XmlElement;
13 import javax.xml.bind.annotation.XmlRootElement;
18 * @brief Class representing buffers
20 * Describes supported buffers (#packets)
23 public class Buffers extends Property {
24 private static final long serialVersionUID = 1L;
26 private int buffersValue;
28 public static final String BuffersPropName = "buffers";
31 * Construct a Buffers property
33 * @param buffers the Buffers
34 * @return Constructed object
36 public Buffers(int buffers) {
37 super(BuffersPropName);
38 this.buffersValue = buffers;
42 * Private constructor used for JAXB mapping
45 super(BuffersPropName);
46 this.buffersValue = 0;
49 public Buffers clone() {
50 return new Buffers(this.buffersValue);
53 public int getValue() {
54 return this.buffersValue;
58 public int hashCode() {
60 int result = super.hashCode();
61 result = prime * result + buffersValue;
66 public boolean equals(Object obj) {
69 if (!super.equals(obj))
71 if (getClass() != obj.getClass())
73 Buffers other = (Buffers) obj;
74 if (buffersValue != other.buffersValue)
80 public String toString() {
81 return "Buffers[" + buffersValue + "]";