X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?p=controller.git;a=blobdiff_plain;f=opendaylight%2Fsal%2Fyang-prototype%2Fyang%2Fyang-model-api%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fmodel%2Fapi%2Ftype%2FRangeConstraint.java;h=12fbb1bcd5728e3ee96b53fdaaa7a6c0384eac98;hp=76bfb75301d4358afcd1537fc1dbfec38d6a68d7;hb=831844b15c26d2e104efff31405032ac09b3095f;hpb=69cf49d6fa850309d11a46dcb36958e21b4d39f7 diff --git a/opendaylight/sal/yang-prototype/yang/yang-model-api/src/main/java/org/opendaylight/controller/model/api/type/RangeConstraint.java b/opendaylight/sal/yang-prototype/yang/yang-model-api/src/main/java/org/opendaylight/controller/model/api/type/RangeConstraint.java index 76bfb75301..12fbb1bcd5 100644 --- a/opendaylight/sal/yang-prototype/yang/yang-model-api/src/main/java/org/opendaylight/controller/model/api/type/RangeConstraint.java +++ b/opendaylight/sal/yang-prototype/yang/yang-model-api/src/main/java/org/opendaylight/controller/model/api/type/RangeConstraint.java @@ -9,9 +9,37 @@ package org.opendaylight.controller.model.api.type; import org.opendaylight.controller.yang.model.api.ConstraintMetaDefinition; +/** + * The Range Constraint interface is used to restrict integer and decimal + * built-in types, or types derived from those. + *
+ * A range consists of an explicit value consists of an explicit value, or a lower bound + * returned by {@link #getMin()} and an upper bound returned by + * {@link #getMax()}.
+ *
+ * Each explicit value and range boundary value given in + * the range expression MUST match the type being restricted, or be one of the + * special values "min" or "max". "min" and "max" mean the minimum and maximum + * value accepted for the type being restricted, respectively + *
+ *
+ * This interface was modeled according to definition in [RFC-6020] The + * range Statement. + */ public interface RangeConstraint extends ConstraintMetaDefinition { - Long getMin(); + /** + * Returns the length-restricting lower bound value. + * + * @return the length-restricting lower bound value. + */ + Number getMin(); - Long getMax(); + /** + * Returns the length-restricting upper bound value. + * + * @return the length-restricting upper bound value. + */ + Number getMax(); }