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%2FDecimal64.java;fp=opendaylight%2Fsal%2Fyang-prototype%2Fyang%2Fyang-model-util%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fyang%2Fmodel%2Futil%2FDecimal64.java;h=158865aec9dff12a3d21f50b8e06f08e2beec151;hb=11b0c275f1abb01bac9b122895a002c8e7905de1;hp=a1073c60cf598d768d3cfd488896d81f0bb82ed2;hpb=c073bcd7e39c1b393d2c2612bbd57334d10294f7;p=controller.git diff --git a/opendaylight/sal/yang-prototype/yang/yang-model-util/src/main/java/org/opendaylight/controller/yang/model/util/Decimal64.java b/opendaylight/sal/yang-prototype/yang/yang-model-util/src/main/java/org/opendaylight/controller/yang/model/util/Decimal64.java index a1073c60cf..158865aec9 100644 --- a/opendaylight/sal/yang-prototype/yang/yang-model-util/src/main/java/org/opendaylight/controller/yang/model/util/Decimal64.java +++ b/opendaylight/sal/yang-prototype/yang/yang-model-util/src/main/java/org/opendaylight/controller/yang/model/util/Decimal64.java @@ -8,8 +8,10 @@ package org.opendaylight.controller.yang.model.util; import java.math.BigDecimal; +import java.net.URI; import java.util.ArrayList; import java.util.Collections; +import java.util.Date; import java.util.List; import org.opendaylight.controller.yang.common.QName; @@ -21,8 +23,8 @@ import org.opendaylight.controller.yang.model.api.type.RangeConstraint; /** * The default implementation of Decimal Type Definition interface. - * - * + * + * * @see DecimalTypeDefinition */ public class Decimal64 implements DecimalTypeDefinition { @@ -52,14 +54,15 @@ public class Decimal64 implements DecimalTypeDefinition { * inclusively as defined interface {@link DecimalTypeDefinition}
* If the fraction digits are not defined inner the definition boundaries * the constructor will throw {@link IllegalArgumentException} - * + * * @param fractionDigits * integer between 1 and 18 inclusively - * + * * @see DecimalTypeDefinition * @exception IllegalArgumentException */ - public Decimal64(final Integer fractionDigits) { + public Decimal64(final List actualPath, final URI namespace, + final Date revision, final Integer fractionDigits) { super(); if (!((fractionDigits.intValue() > 1) && (fractionDigits.intValue() <= 18))) { throw new IllegalArgumentException( @@ -67,12 +70,12 @@ public class Decimal64 implements DecimalTypeDefinition { } this.fractionDigits = fractionDigits; rangeStatements = defaultRangeStatements(); - this.path = BaseTypes.schemaPath(name); + this.path = BaseTypes.schemaPath(actualPath, namespace, revision); } /** * Decimal64 Type Constructor.
- * + * * If parameter Range Statements is null or * defined as empty List the constructor automatically assigns * the boundaries as min and max value defined for Decimal64 in * If the fraction digits are not defined inner the definition boundaries * the constructor will throw {@link IllegalArgumentException} - * + * * @param rangeStatements * Range Constraint Statements * @param fractionDigits * integer between 1 and 18 inclusively * @exception IllegalArgumentException */ - public Decimal64(final List rangeStatements, + public Decimal64(final List actualPath, final URI namespace, + final Date revision, final List rangeStatements, Integer fractionDigits) { super(); if (!((fractionDigits.intValue() > 1) && (fractionDigits.intValue() <= 18))) { @@ -103,7 +107,7 @@ public class Decimal64 implements DecimalTypeDefinition { this.rangeStatements = Collections.unmodifiableList(rangeStatements); } this.fractionDigits = fractionDigits; - this.path = BaseTypes.schemaPath(name); + this.path = BaseTypes.schemaPath(actualPath, namespace, revision); } /** @@ -118,7 +122,7 @@ public class Decimal64 implements DecimalTypeDefinition { * inclusively as defined interface {@link DecimalTypeDefinition}
* If the fraction digits are not defined inner the definition boundaries * the constructor will throw {@link IllegalArgumentException} - * + * * @param units * units associated with the type * @param defaultValue @@ -127,10 +131,11 @@ public class Decimal64 implements DecimalTypeDefinition { * Range Constraint Statements * @param fractionDigits * integer between 1 and 18 inclusively - * + * * @exception IllegalArgumentException */ - public Decimal64(final String units, final BigDecimal defaultValue, + public Decimal64(final List actualPath, final URI namespace, + final Date revision, final String units, final BigDecimal defaultValue, final List rangeStatements, final Integer fractionDigits) { super(); @@ -141,7 +146,7 @@ public class Decimal64 implements DecimalTypeDefinition { if (rangeStatements == null || rangeStatements.isEmpty()) { this.rangeStatements = defaultRangeStatements(); - + } else { this.rangeStatements = Collections.unmodifiableList(rangeStatements); } @@ -153,7 +158,7 @@ public class Decimal64 implements DecimalTypeDefinition { /** * Returns unmodifiable List with default definition of Range Statements. - * + * * @return unmodifiable List with default definition of Range Statements. */ private List defaultRangeStatements() {