*/
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 uint16 built-in type. <br>
* uint16 represents integer values between 0 and 65535, inclusively. The Java
* counterpart of Yang uint16 built-in type is {@link Integer}.
- *
+ *
+ * @deprecated Use {@link org.opendaylight.yangtools.yang.model.util.type.BaseTypes#uint16Type()} instead
*/
-public final class Uint16 extends AbstractUnsignedInteger {
+@Deprecated
+public final class Uint16 extends AbstractUnsignedInteger implements Immutable {
public static final int MAX_VALUE = 65535;
- private static Uint16 instance;
- private static final QName NAME = BaseTypes.constructQName("uint16");
private static final String DESCRIPTION = "uint16 represents integer values between 0 and 65535, inclusively.";
+ private static final Uint16 INSTANCE = new Uint16();
+
private Uint16() {
- super(NAME, DESCRIPTION, MAX_VALUE, "");
+ super(BaseTypes.UINT16_QNAME, DESCRIPTION, MAX_VALUE, "");
}
public static Uint16 getInstance() {
- if (instance == null) {
- instance = new Uint16();
- }
- return instance;
- }
-
- @Override
- public UnsignedIntegerTypeDefinition getBaseType() {
- return this;
+ return INSTANCE;
}
@Override
@Override
public String toString() {
- return "type " + NAME;
+ return "type " + BaseTypes.UINT16_QNAME;
}
}