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%2FUint16.java;h=95b438b509f8258c722aa403ee64a8ac08985411;hb=1e9531138e44cd757ca27b0d86e98eccb22ccd82;hp=9db4ea9df878cdbc72da18ef30ebd431a99d0fdb;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/Uint16.java b/opendaylight/sal/yang-prototype/yang/yang-model-util/src/main/java/org/opendaylight/controller/yang/model/util/Uint16.java index 9db4ea9df8..95b438b509 100644 --- a/opendaylight/sal/yang-prototype/yang/yang-model-util/src/main/java/org/opendaylight/controller/yang/model/util/Uint16.java +++ b/opendaylight/sal/yang-prototype/yang/yang-model-util/src/main/java/org/opendaylight/controller/yang/model/util/Uint16.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.RangeConstraint; import org.opendaylight.controller.yang.model.api.type.UnsignedIntegerTypeDefinition; @@ -21,27 +20,33 @@ import org.opendaylight.controller.yang.model.api.type.UnsignedIntegerTypeDefini * counterpart of Yang uint32 built-in type is {@link Integer}. * */ -public class Uint16 extends AbstractUnsignedInteger { +public final class Uint16 extends AbstractUnsignedInteger { private static final QName name = BaseTypes.constructQName("uint16"); private Integer defaultValue = null; private static final String description = "uint16 represents integer values between 0 and 65535, inclusively."; + private final UnsignedIntegerTypeDefinition baseType; - public Uint16(final List actualPath, - final URI namespace, final Date revision) { - super(actualPath, namespace, revision, name, description, Short.MIN_VALUE, Short.MAX_VALUE, ""); + private Uint16() { + super(name, description, Short.MIN_VALUE, Short.MAX_VALUE, ""); + this.baseType = this; } - public Uint16(final List actualPath, - final URI namespace, final Date revision, final Integer defaultValue) { - super(actualPath, namespace, revision, name, description, Short.MIN_VALUE, Short.MAX_VALUE, ""); + public Uint16(final SchemaPath path) { + super(path, name, description, Short.MIN_VALUE, Short.MAX_VALUE, ""); + this.baseType = new Uint16(); + } + + public Uint16(final SchemaPath path, final Integer defaultValue) { + super(path, name, description, Short.MIN_VALUE, Short.MAX_VALUE, ""); + this.baseType = new Uint16(); this.defaultValue = defaultValue; } - public Uint16(final List actualPath, - final URI namespace, final Date revision, final List rangeStatements, + public Uint16(final SchemaPath path, final List rangeStatements, final String units, final Integer defaultValue) { - super(actualPath, namespace, revision, name, description, rangeStatements, units); + super(path, name, description, rangeStatements, units); + this.baseType = new Uint16(); this.defaultValue = defaultValue; } @@ -53,7 +58,7 @@ public class Uint16 extends AbstractUnsignedInteger { */ @Override public UnsignedIntegerTypeDefinition getBaseType() { - return this; + return baseType; } /*