X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;ds=sidebyside;f=opendaylight%2Fsal%2Fyang-prototype%2Fyang%2Fyang-model-util%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fyang%2Fmodel%2Futil%2FInt32.java;h=8d16e268c35c610750d6e129cbcc1d1ad6882e13;hb=0f393657ea0987d02556ea6e2a367d492a8e5a04;hp=da356309a504735f5644eced96fbebedd81addf2;hpb=11b0c275f1abb01bac9b122895a002c8e7905de1;p=controller.git diff --git a/opendaylight/sal/yang-prototype/yang/yang-model-util/src/main/java/org/opendaylight/controller/yang/model/util/Int32.java b/opendaylight/sal/yang-prototype/yang/yang-model-util/src/main/java/org/opendaylight/controller/yang/model/util/Int32.java index da356309a5..8d16e268c3 100644 --- a/opendaylight/sal/yang-prototype/yang/yang-model-util/src/main/java/org/opendaylight/controller/yang/model/util/Int32.java +++ b/opendaylight/sal/yang-prototype/yang/yang-model-util/src/main/java/org/opendaylight/controller/yang/model/util/Int32.java @@ -7,11 +7,10 @@ */ package org.opendaylight.controller.yang.model.util; -import java.net.URI; -import java.util.Date; import java.util.List; import org.opendaylight.controller.yang.common.QName; +import org.opendaylight.controller.yang.model.api.SchemaPath; import org.opendaylight.controller.yang.model.api.type.IntegerTypeDefinition; import org.opendaylight.controller.yang.model.api.type.RangeConstraint; @@ -24,28 +23,34 @@ import org.opendaylight.controller.yang.model.api.type.RangeConstraint; * @see AbstractSignedInteger * */ -public class Int32 extends AbstractSignedInteger { +public final class Int32 extends AbstractSignedInteger { private static final QName name = BaseTypes.constructQName("int32"); private Integer defaultValue = null; - private static final String description = - "int32 represents integer values between -2147483648 and 2147483647, inclusively."; + private static final String description = "int32 represents integer values between -2147483648 and 2147483647, inclusively."; + private final IntegerTypeDefinition baseType; - public Int32(final List actualPath, final URI namespace, - final Date revision) { - super(actualPath, namespace, revision, name, description, Integer.MIN_VALUE, Integer.MAX_VALUE, ""); + private Int32() { + super(name, description, Integer.MIN_VALUE, Integer.MAX_VALUE, ""); + this.baseType = this; } - public Int32(final List actualPath, final URI namespace, - final Date revision, final Integer defaultValue) { - super(actualPath, namespace, revision, name, description, Integer.MIN_VALUE, Integer.MAX_VALUE, ""); + public Int32(final SchemaPath path) { + super(path, name, description, Integer.MIN_VALUE, Integer.MAX_VALUE, ""); + this.baseType = new Int32(); + } + + public Int32(final SchemaPath path, final Integer defaultValue) { + super(path, name, description, Integer.MIN_VALUE, Integer.MAX_VALUE, ""); + this.baseType = new Int32(); this.defaultValue = defaultValue; } - public Int32(final List actualPath, final URI namespace, - final Date revision, final List rangeStatements, - final String units, final Integer defaultValue) { - super(actualPath, namespace, revision, name, description, rangeStatements, units); + public Int32(final SchemaPath path, + final List rangeStatements, final String units, + final Integer defaultValue) { + super(path, name, description, rangeStatements, units); + this.baseType = new Int32(); this.defaultValue = defaultValue; } @@ -57,7 +62,7 @@ public class Int32 extends AbstractSignedInteger { */ @Override public IntegerTypeDefinition getBaseType() { - return this; + return baseType; } /*