*/
package org.opendaylight.yangtools.yang.model.util;
-import org.opendaylight.yangtools.yang.common.QName;
+import org.opendaylight.yangtools.concepts.Immutable;
/**
* Implementation of Yang uint32 built-in type. <br>
* uint32 represents integer values between 0 and 4294967295, inclusively.
*
*/
-public final class Uint32 extends AbstractUnsignedInteger {
+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;
+ return INSTANCE;
}
@Override
@Override
public String toString() {
- return "type " + NAME;
+ return "type " + BaseTypes.UINT32_QNAME;
}
}