Updated YANG Type definitions and documentation in YANG Model Utils.
[controller.git] / opendaylight / sal / yang-prototype / yang / yang-model-util / src / main / java / org / opendaylight / controller / model / util / Uint8.java
index 39314fe7183a2aa0b79ef6d7452991660fafc09f..d4429dccb34e20fd1071ad857e2ca11f86785e3d 100644 (file)
@@ -9,40 +9,37 @@ package org.opendaylight.controller.model.util;
 \r
 import java.util.List;\r
 \r
-import org.opendaylight.controller.model.api.type.IntegerTypeDefinition;\r
 import org.opendaylight.controller.model.api.type.RangeConstraint;\r
+import org.opendaylight.controller.model.api.type.UnsignedIntegerTypeDefinition;\r
 import org.opendaylight.controller.yang.common.QName;\r
 \r
-public class Uint8 extends AbstractInteger {\r
+/**\r
+ * Implementation of Yang uint8 built-in type.\r
+ * <br>\r
+ * uint8 represents integer values between 0 and 255, inclusively. The Java counterpart of \r
+ * Yang uint8 built-in type is {@link Short}.\r
+ * \r
+ * @see AbstractUnsignedInteger\r
+ */\r
+public class Uint8 extends AbstractUnsignedInteger {\r
 \r
     private static final QName name = BaseTypes.constructQName("uint8");\r
     private Short defaultValue = null;\r
-    private static final String description = "";\r
-    private static final String reference = "";\r
+    private static final String description = \r
+            "uint8  represents integer values between 0 and 255, inclusively.";\r
 \r
     public Uint8() {\r
-        super(name, description, reference);\r
+        super(name, description, Short.MIN_VALUE, Short.MAX_VALUE, "");\r
     }\r
 \r
     public Uint8(final Short defaultValue) {\r
-        super(name, description, reference);\r
-        this.defaultValue = defaultValue;\r
-    }\r
-\r
-    public Uint8(final List<RangeConstraint> rangeStatements,\r
-            final Short defaultValue) {\r
-        super(name, description, reference, rangeStatements);\r
-        this.defaultValue = defaultValue;\r
-    }\r
-\r
-    public Uint8(final String units, final Short defaultValue) {\r
-        super(name, description, reference, units);\r
+        super(name, description, Short.MIN_VALUE, Short.MAX_VALUE, "");\r
         this.defaultValue = defaultValue;\r
     }\r
 \r
     public Uint8(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
@@ -52,7 +49,7 @@ public class Uint8 extends AbstractInteger {
      * @see org.opendaylight.controller.yang.model.api.TypeDefinition#getBaseType()\r
      */\r
     @Override\r
-    public IntegerTypeDefinition getBaseType() {\r
+    public UnsignedIntegerTypeDefinition getBaseType() {\r
         return this;\r
     }\r
 \r