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%2FLengthConstraint.java;h=97f4448f57cde5c347616aa90afd88342bd32139;hp=8c9cb79ad06a059bdb75fc6a6b9f2267f112b4f0;hb=831844b15c26d2e104efff31405032ac09b3095f;hpb=69cf49d6fa850309d11a46dcb36958e21b4d39f7 diff --git a/opendaylight/sal/yang-prototype/yang/yang-model-api/src/main/java/org/opendaylight/controller/model/api/type/LengthConstraint.java b/opendaylight/sal/yang-prototype/yang/yang-model-api/src/main/java/org/opendaylight/controller/model/api/type/LengthConstraint.java index 8c9cb79ad0..97f4448f57 100644 --- a/opendaylight/sal/yang-prototype/yang/yang-model-api/src/main/java/org/opendaylight/controller/model/api/type/LengthConstraint.java +++ b/opendaylight/sal/yang-prototype/yang/yang-model-api/src/main/java/org/opendaylight/controller/model/api/type/LengthConstraint.java @@ -9,9 +9,42 @@ package org.opendaylight.controller.model.api.type; import org.opendaylight.controller.yang.model.api.ConstraintMetaDefinition; +/** + * The Lenght Constraint value consists of an explicit value, or a lower bound + * returned by {@link #getMin()} and an upper bound returned by + * {@link #getMax()}.
+ *
+ * Length-restricting values MUST NOT be negative. A length value is a + * non-negative integer, or one of the special values min or + * max. The defined min and max mean the + * minimum and maximum length accepted for the type being restricted, + * respectively.
+ * An implementation is not required to support a length value larger than + * {@link Long#MAX_VALUE}
+ *
+ * The interface extends definitions from {@link ConstraintMetaDefinition}
+ *
+ * This interface was modeled according to definition in [RFC-6020] The + * length Statement. + * + * @see ConstraintMetaDefinition + */ public interface LengthConstraint extends ConstraintMetaDefinition { + /** + * Returns the length-restricting lower bound value.
+ * The value MUST NOT be negative. + * + * @return the length-restricting lower bound value. + */ Long getMin(); + /** + * Returns the length-restricting upper bound value.
+ * The value MUST NOT be negative. + * + * @return length-restricting upper bound value. + */ Long getMax(); }