/**
* Utility class which provides factory methods to construct Constraints.
*
+ * <p>
* Provides static factory methods which constructs instances of
* <ul>
* <li>{@link LengthConstraint} - {@link #newLengthConstraint(Number, Number, Optional, Optional)}
/**
* 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 <<i>min</i>, <i>max</i> ></code>
+ * <li>{@link LengthConstraint#getErrorMessage()} returns <code>The argument is out of bounds
+ * <<i>min</i>, <i>max</i> ></code>
* </ul>
*
* @see LengthConstraint
* @param reference Reference associated with constraint. {@link Optional#absent()} 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) {
+ 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 <<i>min</i>, <i>max</i> ></code>
+ * <li>{@link LengthConstraint#getErrorMessage()} returns <code>The argument is out of bounds
+ * <<i>min</i>, <i>max</i> ></code>
* </ul>
*
* @see LengthConstraint
/**
* 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 <<i>min</i>, <i>max</i> ></code>
+ * <li>{@link RangeConstraint#getErrorMessage()} returns <code>The argument is out of bounds
+ * <<i>min</i>, <i>max</i> ></code>
* </ul>
*
- *
* @see RangeConstraint
*
* @param <T> Type of constraint
* @param reference Reference associated with constraint. {@link Optional#absent()} 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) {
+ 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 <<i>min</i>, <i>max</i> ></code>
+ * <li>{@link RangeConstraint#getErrorMessage()} returns <code>The argument is out of bounds
+ * <<i>min</i>, <i>max</i> ></code>
* </ul>
*
- *
* @see RangeConstraint
*
* @param <T> Type of constraint
/**
* Creates a {@link PatternConstraint}.
*
+ * <p>
* Creates an instance of Pattern constraint based on supplied parameters
* with additional behaviour:
- *
* <ul>
* <li>{@link PatternConstraint#getErrorAppTag()} returns
* <code>invalid-regular-expression</code>
/**
* Creates a {@link PatternConstraint}.
*
+ * <p>
* Creates an instance of Pattern constraint based on supplied parameters
* with additional behaviour:
- *
* <ul>
* <li>{@link PatternConstraint#getErrorAppTag()} returns
* <code>invalid-regular-expression</code>