BUG-8043: correct RangeConstraint definition
[yangtools.git] / yang / yang-model-util / src / main / java / org / opendaylight / yangtools / yang / model / util / BaseConstraints.java
index cda1b56fc929bdd8f4abae3f7f2d24d0b8366fef..020c3b10d4aa36c0b7eed5927fc66c104a18059b 100644 (file)
@@ -10,7 +10,6 @@ package org.opendaylight.yangtools.yang.model.util;
 import java.util.Optional;
 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;
 
 /**
  * Utility class which provides factory methods to construct Constraints.
@@ -18,7 +17,6 @@ import org.opendaylight.yangtools.yang.model.api.type.RangeConstraint;
  * <p>
  * Provides static factory methods which constructs instances of
  * <ul>
- * <li>{@link RangeConstraint} - {@link #newRangeConstraint(Number, Number, Optional, Optional)}
  * <li>{@link PatternConstraint} - {@link #newPatternConstraint(String, Optional, Optional)}
  * </ul>
  */
@@ -27,61 +25,6 @@ public final class BaseConstraints {
         throw new UnsupportedOperationException();
     }
 
-    /**
-     * Creates a {@link RangeConstraint}.
-     *
-     * <p>
-     * Creates an instance of Range constraint based on supplied parameters
-     * with additional behaviour:
-     * <ul>
-     * <li>{@link RangeConstraint#getErrorAppTag()} returns <code>range-out-of-specified-bounds</code>
-     * <li>{@link RangeConstraint#getErrorMessage()} returns <code>The argument is out of bounds
-     *     &lt;<i>min</i>, <i>max</i> &gt;</code>
-     * </ul>
-     *
-     * @see RangeConstraint
-     *
-     * @param <T> Type of constraint
-     * @param min value-restricting lower bound value. The value MUST NOT Be null.
-     * @param max value-restricting upper bound value. The value MUST NOT Be null.
-     * @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 RangeConstraint}
-     */
-    public static <T extends Number> RangeConstraint newRangeConstraint(final T min, final T max,
-            final Optional<String> description, final Optional<String> reference) {
-        return new RangeConstraintImpl(min, max, description, reference);
-    }
-
-    /**
-     * Creates a {@link RangeConstraint}.
-     *
-     * <p>
-     * Creates an instance of Range constraint based on supplied parameters
-     * with additional behaviour:
-     * <ul>
-     * <li>{@link RangeConstraint#getErrorAppTag()} returns <code>range-out-of-specified-bounds</code>
-     * <li>{@link RangeConstraint#getErrorMessage()} returns <code>The argument is out of bounds
-     *     &lt;<i>min</i>, <i>max</i> &gt;</code>
-     * </ul>
-     *
-     * @see RangeConstraint
-     *
-     * @param <T> Type of constraint
-     * @param min value-restricting lower bound value. The value MUST NOT Be null.
-     * @param max value-restricting upper bound value. The value MUST NOT Be null.
-     * @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 RangeConstraint}
-     */
-    public static <T extends Number> RangeConstraint newRangeConstraint(final T min, final T max,
-            final Optional<String> description, final Optional<String> reference, final String errorAppTag,
-            final String errorMessage) {
-        return new RangeConstraintImpl(min, max, description, reference, errorAppTag, errorMessage);
-    }
-
     /**
      * Creates a {@link PatternConstraint}.
      *