-
- /**
- * Creates a {@link LengthConstraint}.
- *
- * 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 <<i>min</i>, <i>max</i> ></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.
- * @param reference Reference associated with constraint.
- * @return Instance of {@link LengthConstraint}
- * @deprecated Use {@link #newLengthConstraint(Number, Number, Optional, Optional)} instead.
- */
- @Deprecated
- public static LengthConstraint lengthConstraint(final Number min, final Number max, final String description,
- final String reference) {
- return newLengthConstraint(min, max, Optional.fromNullable(description), Optional.fromNullable(reference));
- }
-
- /**
- * Creates a {@link RangeConstraint}.
- *
- * 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 <<i>min</i>, <i>max</i> ></code>
- * </ul>
- *
- *
- * @see RangeConstraint
- *
- * @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.
- * @param reference Reference associated with constraint.
- * @return Instance of {@link RangeConstraint}
- * @deprecated Use {@link #newRangeConstraint(Number, Number, Optional, Optional)} instead.
- */
- @Deprecated
- public static RangeConstraint rangeConstraint(final Number min, final Number max, final String description,
- final String reference) {
- return newRangeConstraint(min, max, Optional.fromNullable(description), Optional.fromNullable(reference));
- }
-