BUG-8043: correct LengthConstraint definition
[yangtools.git] / yang / yang-model-util / src / main / java / org / opendaylight / yangtools / yang / model / util / BaseConstraints.java
index 7b3d71b112208e9400a2b968ea4d3236cf461f78..cda1b56fc929bdd8f4abae3f7f2d24d0b8366fef 100644 (file)
@@ -8,7 +8,6 @@
 package org.opendaylight.yangtools.yang.model.util;
 
 import java.util.Optional;
-import org.opendaylight.yangtools.yang.model.api.type.LengthConstraint;
 import org.opendaylight.yangtools.yang.model.api.type.ModifierKind;
 import org.opendaylight.yangtools.yang.model.api.type.PatternConstraint;
 import org.opendaylight.yangtools.yang.model.api.type.RangeConstraint;
@@ -19,7 +18,6 @@ import org.opendaylight.yangtools.yang.model.api.type.RangeConstraint;
  * <p>
  * Provides static factory methods which constructs instances of
  * <ul>
- * <li>{@link LengthConstraint} - {@link #newLengthConstraint(Number, Number, Optional, Optional)}
  * <li>{@link RangeConstraint} - {@link #newRangeConstraint(Number, Number, Optional, Optional)}
  * <li>{@link PatternConstraint} - {@link #newPatternConstraint(String, Optional, Optional)}
  * </ul>
@@ -29,59 +27,6 @@ public final class BaseConstraints {
         throw new UnsupportedOperationException();
     }
 
-    /**
-     * Creates a {@link LengthConstraint}.
-     *
-     * <p>
-     * Creates an instance of Length constraint based on supplied parameters
-     * with additional behaviour:
-     * <ul>
-     * <li>{@link LengthConstraint#getErrorAppTag()} returns <code>length-out-of-specified-bounds</code>
-     * <li>{@link LengthConstraint#getErrorMessage()} returns <code>The argument is out of bounds
-     *     &lt;<i>min</i>, <i>max</i> &gt;</code>
-     * </ul>
-     *
-     * @see LengthConstraint
-     *
-     * @param min  length-restricting lower bound value. The value MUST NOT be negative.
-     * @param max length-restricting upper bound value. The value MUST NOT be negative.
-     * @param description Description associated with constraint. {@link Optional#empty()} if description is undefined.
-     * @param reference Reference associated with constraint. {@link Optional#empty()} if reference is undefined.
-     * @return Instance of {@link LengthConstraint}
-     */
-    public static LengthConstraint newLengthConstraint(final Number min, final Number max,
-            final Optional<String> description, final Optional<String> reference) {
-        return new LengthConstraintImpl(min, max, description, reference);
-    }
-
-    /**
-     * Creates a {@link LengthConstraint}.
-     *
-     * <p>
-     * Creates an instance of Length constraint based on supplied parameters
-     * with additional behaviour:
-     * <ul>
-     * <li>{@link LengthConstraint#getErrorAppTag()} returns <code>length-out-of-specified-bounds</code>
-     * <li>{@link LengthConstraint#getErrorMessage()} returns <code>The argument is out of bounds
-     *     &lt;<i>min</i>, <i>max</i> &gt;</code>
-     * </ul>
-     *
-     * @see LengthConstraint
-     *
-     * @param min  length-restricting lower bound value. The value MUST NOT be negative.
-     * @param max length-restricting upper bound value. The value MUST NOT be negative.
-     * @param description Description associated with constraint. {@link Optional#empty()} if description is undefined.
-     * @param reference Reference associated with constraint. {@link Optional#empty()} if reference is undefined.
-     * @param errorAppTag error-app-tag associated with constraint.
-     * @param errorMessage error message associated with constraint.
-     * @return Instance of {@link LengthConstraint}
-     */
-    public static LengthConstraint newLengthConstraint(final Number min, final Number max,
-            final Optional<String> description, final Optional<String> reference, final String errorAppTag,
-            final String errorMessage) {
-        return new LengthConstraintImpl(min, max, description, reference, errorAppTag, errorMessage);
-    }
-
     /**
      * Creates a {@link RangeConstraint}.
      *