Bug 6414: Fixed DataNodeIterator's traverseModule method
[yangtools.git] / yang / yang-model-util / src / main / java / org / opendaylight / yangtools / yang / model / util / Uint32.java
index d5d3e9efe6b885d1c37ab0e318e7a512a85c0fed..c48c4d42cc8c1ade2f157908c3abec1436ccfffe 100644 (file)
@@ -7,36 +7,30 @@
  */
 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 uint32 built-in type. <br>
  * uint32 represents integer values between 0 and 4294967295, inclusively.
  *
+ * @deprecated Use {@link org.opendaylight.yangtools.yang.model.util.type.BaseTypes#uint32Type()} instead
  */
-public final class Uint32 extends AbstractUnsignedInteger {
+@Deprecated
+public final class Uint32 extends AbstractUnsignedInteger implements Immutable {
     public static final long MAX_VALUE = 4294967295L;
-    private static Uint32 INSTANCE;
-    private static final QName NAME = BaseTypes.constructQName("uint32");
     private static final String DESCRIPTION = "uint32 represents integer values between 0 and 4294967295, inclusively.";
 
+    private static final Uint32 INSTANCE = new Uint32();
+
+
     private Uint32() {
-        super(NAME, DESCRIPTION, MAX_VALUE, "");
+        super(BaseTypes.UINT32_QNAME, DESCRIPTION, MAX_VALUE, "");
     }
 
     public static Uint32 getInstance() {
-        if (INSTANCE == null) {
-            INSTANCE = new Uint32();
-        }
         return INSTANCE;
     }
 
-    @Override
-    public UnsignedIntegerTypeDefinition getBaseType() {
-        return this;
-    }
-
     @Override
     public Object getDefaultValue() {
         return null;
@@ -44,7 +38,7 @@ public final class Uint32 extends AbstractUnsignedInteger {
 
     @Override
     public String toString() {
-        return "type " + NAME;
+        return "type " + BaseTypes.UINT32_QNAME;
     }
 
 }