Package io.github.mmm.validation.string
Class CharSequenceValidatorBuilder<V extends CharSequence,PARENT,SELF extends CharSequenceValidatorBuilder<V,PARENT,SELF>>
- java.lang.Object
-
- io.github.mmm.validation.main.ObjectValidatorBuilder<V,PARENT,SELF>
-
- io.github.mmm.validation.string.CharSequenceValidatorBuilder<V,PARENT,SELF>
-
- Type Parameters:
V- the generic type of the value tovalidate.PARENT- the generic type of theparent builder.SELF- the generic type of this builder itself (this).
- All Implemented Interfaces:
Builder<Validator<? super V>>,ValidatorRegistry<V,SELF>
- Direct Known Subclasses:
ValidatorBuilderCharSequence,ValidatorBuilderString
public abstract class CharSequenceValidatorBuilder<V extends CharSequence,PARENT,SELF extends CharSequenceValidatorBuilder<V,PARENT,SELF>> extends ObjectValidatorBuilder<V,PARENT,SELF>
- Since:
- 1.0.0
-
-
Constructor Summary
Constructors Constructor Description CharSequenceValidatorBuilder(PARENT parent)The constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description SELFemail()Adds aValidatorEmail.SELFemailSpec()Adds aValidatorEmailSpec.SELFhost()Adds aValidatorHost(hostname or IP-address).SELFhostname()Adds aValidatorHostName.SELFipAddress()Adds aValidatorIpAddress.SELFmax(int max)SELFmin(int min)SELFpattern(String pattern)SELFpattern(Pattern pattern)SELFphoneNumber()Adds aValidatorPhoneNumber.SELFrange(Integer min, Integer max)SELFrange(String min, String max)This method allows to define a range in a generic way.-
Methods inherited from class io.github.mmm.validation.main.ObjectValidatorBuilder
add, add, and, build, getValidators, mandatory, max, min, self
-
-
-
-
Method Detail
-
pattern
public SELF pattern(String pattern)
- Parameters:
pattern- the regular expressionPatternto match.- Returns:
- this build instance for fluent API calls.
-
pattern
public SELF pattern(Pattern pattern)
- Parameters:
pattern- the regular expressionPatternto match.- Returns:
- this build instance for fluent API calls.
-
min
public SELF min(int min)
- Parameters:
min- the minimum length allowed.- Returns:
- this build instance for fluent API calls.
-
max
public SELF max(int max)
- Parameters:
max- the maximum length allowed.- Returns:
- this build instance for fluent API calls.
-
range
public SELF range(Integer min, Integer max)
- Parameters:
min- the minimum length allowed ornullfor no lower bound.max- the maximum length allowed ornullfor no upper bound.- Returns:
- this build instance for fluent API calls.
-
range
public SELF range(String min, String max)
Description copied from class:ObjectValidatorBuilderThis method allows to define a range in a generic way. If you have a properly typed builder please use more specific methods such asComparableValidatorBuilder.range(io.github.mmm.base.range.Range)instead.- Specified by:
rangein classObjectValidatorBuilder<V extends CharSequence,PARENT,SELF extends CharSequenceValidatorBuilder<V,PARENT,SELF>>- Parameters:
min- the minimum value allowed ornullfor no lower bound.max- the maximum value allowed ornullfor no upper bound.- Returns:
- this build instance for fluent API calls.
-
email
public SELF email()
Adds aValidatorEmail.- Returns:
- this build instance for fluent API calls.
-
emailSpec
public SELF emailSpec()
Adds aValidatorEmailSpec.- Returns:
- this build instance for fluent API calls.
-
phoneNumber
public SELF phoneNumber()
Adds aValidatorPhoneNumber.- Returns:
- this build instance for fluent API calls.
-
host
public SELF host()
Adds aValidatorHost(hostname or IP-address).- Returns:
- this build instance for fluent API calls.
-
hostname
public SELF hostname()
Adds aValidatorHostName.- Returns:
- this build instance for fluent API calls.
-
ipAddress
public SELF ipAddress()
Adds aValidatorIpAddress.- Returns:
- this build instance for fluent API calls.
-
-