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=79ae4674b0b48971005c09ad76cad8d528b6a215;hb=9ceed566491d172e02220b04ec6869867f2f2473;hp=f58c765886b76b10aa2b3b65e5926aec4e676e91;hpb=4ce0f6630bc576b97c8c9a08848aafb6e90a75b0;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 f58c765886..79ae4674b0 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,53 +7,41 @@ */ package org.opendaylight.controller.yang.model.util; -import java.util.List; - import org.opendaylight.controller.yang.common.QName; -import org.opendaylight.controller.yang.model.api.type.RangeConstraint; +import org.opendaylight.controller.yang.model.api.SchemaPath; import org.opendaylight.controller.yang.model.api.type.UnsignedIntegerTypeDefinition; /** * Implementation of Yang uint32 built-in type.
* uint16 represents integer values between 0 and 65535, inclusively. The Java * 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() { - super(name, description, Short.MIN_VALUE, Short.MAX_VALUE, ""); - } - - public Uint16(final Integer defaultValue) { - super(name, description, Short.MIN_VALUE, Short.MAX_VALUE, ""); - this.defaultValue = defaultValue; - } - - public Uint16(final List rangeStatements, - final String units, final Integer defaultValue) { - super(name, description, rangeStatements, units); - this.defaultValue = defaultValue; + public Uint16(final SchemaPath path) { + super(path, name, description, Short.MIN_VALUE, Short.MAX_VALUE, ""); + this.baseType = this; } /* * (non-Javadoc) - * + * * @see * org.opendaylight.controller.yang.model.api.TypeDefinition#getBaseType() */ @Override public UnsignedIntegerTypeDefinition getBaseType() { - return this; + return baseType; } /* * (non-Javadoc) - * + * * @see * org.opendaylight.controller.yang.model.api.TypeDefinition#getDefaultValue * ()