X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=opendaylight%2Fsal%2Fyang-prototype%2Fyang%2Fyang-model-util%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fyang%2Fmodel%2Futil%2FInt16.java;h=0a24bf2d059166a65345775cbd34734e83813005;hb=refs%2Fchanges%2F11%2F411%2F3;hp=750dff5c7a5e9d88094c728f097a7e1c0ca81809;hpb=258cac6ec48a0a4ff62b33b4bdcbac5105a1e006;p=controller.git diff --git a/opendaylight/sal/yang-prototype/yang/yang-model-util/src/main/java/org/opendaylight/controller/yang/model/util/Int16.java b/opendaylight/sal/yang-prototype/yang/yang-model-util/src/main/java/org/opendaylight/controller/yang/model/util/Int16.java index 750dff5c7a..0a24bf2d05 100644 --- a/opendaylight/sal/yang-prototype/yang/yang-model-util/src/main/java/org/opendaylight/controller/yang/model/util/Int16.java +++ b/opendaylight/sal/yang-prototype/yang/yang-model-util/src/main/java/org/opendaylight/controller/yang/model/util/Int16.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; @@ -22,28 +21,35 @@ import org.opendaylight.controller.yang.model.api.type.RangeConstraint; * * @see AbstractSignedInteger */ -public class Int16 extends AbstractSignedInteger { +public final class Int16 extends AbstractSignedInteger { private static final QName name = BaseTypes.constructQName("int16"); private Short defaultValue = null; - private static final String description = - "int16 represents integer values between -32768 and 32767, inclusively."; + private static final String description = "int16 represents integer values between -32768 and 32767, inclusively."; + private final IntegerTypeDefinition baseType; - public Int16(final List actualPath, final URI namespace, - final Date revision) { - super(actualPath, namespace, revision, name, description, Short.MIN_VALUE, Short.MAX_VALUE, ""); + private Int16() { + super(name, description, Short.MIN_VALUE, Short.MAX_VALUE, ""); + this.baseType = this; } - public Int16(final List actualPath, final URI namespace, - final Date revision, final List rangeStatements, - final String units, final Short defaultValue) { - super(actualPath, namespace, revision, name, description, rangeStatements, units); + public Int16(final SchemaPath path) { + super(path, name, description, Short.MIN_VALUE, Short.MAX_VALUE, ""); + this.baseType = new Int16(); + + } + + public Int16(final SchemaPath path, + final List rangeStatements, final String units, + final Short defaultValue) { + super(path, name, description, rangeStatements, units); this.defaultValue = defaultValue; + this.baseType = new Int16(); } @Override public IntegerTypeDefinition getBaseType() { - return this; + return baseType; } @Override