*/
package org.opendaylight.yangtools.yang.model.util;
-import org.opendaylight.yangtools.yang.common.QName;
-import org.opendaylight.yangtools.yang.model.api.type.UnsignedIntegerTypeDefinition;
+import org.opendaylight.yangtools.concepts.Immutable;
/**
* Implementation of Yang uint8 built-in type. <br>
* uint8 represents integer values between 0 and 255, inclusively.
*
* @see AbstractUnsignedInteger
+ * @deprecated Use {@link org.opendaylight.yangtools.yang.model.util.type.BaseTypes#uint8Type()} instead
*/
-public final class Uint8 extends AbstractUnsignedInteger {
+@Deprecated
+public final class Uint8 extends AbstractUnsignedInteger implements Immutable {
public static final int MAX_VALUE = 255;
- private static Uint8 INSTANCE;
- private static final QName NAME = BaseTypes.constructQName("uint8");
private static final String DESCRIPTION = "uint8 represents integer values between 0 and 255, inclusively.";
+ private static final Uint8 INSTANCE = new Uint8();
+
private Uint8() {
- super(NAME, DESCRIPTION, MAX_VALUE, "");
+ super(BaseTypes.UINT8_QNAME, DESCRIPTION, MAX_VALUE, "");
}
public static Uint8 getInstance() {
- if (INSTANCE == null) {
- INSTANCE = new Uint8();
- }
return INSTANCE;
}
- @Override
- public UnsignedIntegerTypeDefinition getBaseType() {
- return this;
- }
-
@Override
public Object getDefaultValue() {
return null;
@Override
public String toString() {
- return "type " + NAME;
+ return "type " + BaseTypes.UINT8_QNAME;
}
}