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%2FAbstractSignedInteger.java;h=baefbf40fe97d413a377a25fc9ba5ebe4e159d94;hb=9ceed566491d172e02220b04ec6869867f2f2473;hp=366df63971a80ef7b34153b413e98451c7a6c936;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/AbstractSignedInteger.java b/opendaylight/sal/yang-prototype/yang/yang-model-util/src/main/java/org/opendaylight/controller/yang/model/util/AbstractSignedInteger.java index 366df63971..baefbf40fe 100644 --- a/opendaylight/sal/yang-prototype/yang/yang-model-util/src/main/java/org/opendaylight/controller/yang/model/util/AbstractSignedInteger.java +++ b/opendaylight/sal/yang-prototype/yang/yang-model-util/src/main/java/org/opendaylight/controller/yang/model/util/AbstractSignedInteger.java @@ -23,7 +23,7 @@ import org.opendaylight.controller.yang.model.api.type.RangeConstraint; * interface which represents SIGNED Integer values defined in Yang language.
* The integer built-in types in Yang are int8, int16, int32, int64. They * represent signed integers of different sizes: - * + * * - * + * */ public abstract class AbstractSignedInteger implements IntegerTypeDefinition { - private final QName name; private final SchemaPath path; private final String description; private final String reference = "https://tools.ietf.org/html/rfc6020#section-9.2"; - private final String units; private final List rangeStatements; @@ -51,17 +49,19 @@ public abstract class AbstractSignedInteger implements IntegerTypeDefinition { * @param maxRange * @param units */ - public AbstractSignedInteger(final QName name, final String description, - final Number minRange, final Number maxRange, final String units) { + public AbstractSignedInteger(final SchemaPath path, final QName name, + final String description, final Number minRange, + final Number maxRange, final String units) { this.name = name; this.description = description; - this.path = BaseTypes.schemaPath(name); + this.path = path; this.units = units; this.rangeStatements = new ArrayList(); final String rangeDescription = "Integer values between " + minRange + " and " + maxRange + ", inclusively."; this.rangeStatements.add(BaseConstraints.rangeConstraint(minRange, - maxRange, rangeDescription, "https://tools.ietf.org/html/rfc6020#section-9.2.4")); + maxRange, rangeDescription, + "https://tools.ietf.org/html/rfc6020#section-9.2.4")); } /** @@ -70,11 +70,12 @@ public abstract class AbstractSignedInteger implements IntegerTypeDefinition { * @param rangeStatements * @param units */ - public AbstractSignedInteger(final QName name, final String description, + public AbstractSignedInteger(final SchemaPath path, final QName name, + final String description, final List rangeStatements, final String units) { this.name = name; this.description = description; - this.path = BaseTypes.schemaPath(name); + this.path = path; this.units = units; this.rangeStatements = rangeStatements; }