\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
* @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