/*\r
- * Copyright (c) 2013 Cisco Systems, Inc. and others. All rights reserved.\r
- *\r
- * This program and the accompanying materials are made available under the\r
- * terms of the Eclipse Public License v1.0 which accompanies this distribution,\r
- * and is available at http://www.eclipse.org/legal/epl-v10.html\r
- */\r
+ * Copyright (c) 2013 Cisco Systems, Inc. and others. All rights reserved.\r
+ *\r
+ * This program and the accompanying materials are made available under the\r
+ * terms of the Eclipse Public License v1.0 which accompanies this distribution,\r
+ * and is available at http://www.eclipse.org/legal/epl-v10.html\r
+ */\r
package org.opendaylight.controller.model.util;\r
\r
import java.util.List;\r
import org.opendaylight.controller.model.api.type.RangeConstraint;\r
import org.opendaylight.controller.yang.common.QName;\r
\r
-public class Int16 extends AbstractInteger {\r
+/**\r
+ * Implementation of Yang int16 built-in type. <br>\r
+ * int16 represents integer values between -32768 and 32767, inclusively. The\r
+ * Java counterpart of Yang int16 built-in type is {@link Short}.\r
+ * \r
+ * @see AbstractSignedInteger\r
+ */\r
+public class Int16 extends AbstractSignedInteger {\r
\r
private static final QName name = BaseTypes.constructQName("int16");\r
private Short defaultValue = null;\r
- private static final String description = "";\r
- private static final String reference = "";\r
+ private static final String description = \r
+ "int16 represents integer values between -32768 and 32767, inclusively.";\r
\r
public Int16() {\r
- super(name, description, reference);\r
- }\r
-\r
- public Int16(final Short defaultValue) {\r
- super(name, description, reference);\r
- this.defaultValue = defaultValue;\r
- }\r
-\r
- public Int16(final List<RangeConstraint> rangeStatements,\r
- final Short defaultValue) {\r
- super(name, description, reference, rangeStatements);\r
- this.defaultValue = defaultValue;\r
- }\r
-\r
- public Int16(final String units, final Short defaultValue) {\r
- super(name, description, reference, units);\r
- this.defaultValue = defaultValue;\r
+ super(name, description, Short.MIN_VALUE, Short.MAX_VALUE, "");\r
}\r
\r
public Int16(final List<RangeConstraint> rangeStatements,\r
final String units, final Short defaultValue) {\r
- super(name, description, reference, units, rangeStatements);\r
+ super(name, description, rangeStatements, units);\r
this.defaultValue = defaultValue;\r
}\r
\r