Class ComparableValidatorBuilder<V extends Comparable<?>,PARENT,SELF extends ComparableValidatorBuilder<V,PARENT,SELF>>

java.lang.Object
io.github.mmm.validation.main.ObjectValidatorBuilder<V,PARENT,SELF>
io.github.mmm.validation.main.ComparableValidatorBuilder<V,PARENT,SELF>
Type Parameters:
V - the generic type of the value to validate.
PARENT - the generic type of the parent builder.
SELF - the generic type of this builder itself (this).
All Implemented Interfaces:
io.github.mmm.base.lang.Builder<Validator<? super V>>, ValidatorRegistry<V,SELF>
Direct Known Subclasses:
NumberValidatorBuilder, ValidatorBuilderDayOfWeek, ValidatorBuilderMonth, ValidatorBuilderTemporal, ValidatorBuilderYear

public abstract class ComparableValidatorBuilder<V extends Comparable<?>,PARENT,SELF extends ComparableValidatorBuilder<V,PARENT,SELF>> extends ObjectValidatorBuilder<V,PARENT,SELF>
Since:
1.0.0
  • Constructor Details

    • ComparableValidatorBuilder

      public ComparableValidatorBuilder(PARENT parent)
      The constructor.
      Parameters:
      parent - the parent builder.
  • Method Details

    • parse

      protected abstract V parse(String value)
      Parameters:
      value - the value as String.
      Returns:
      the parsed value.
    • range

      public SELF range(io.github.mmm.base.range.Range<V> range)
      Parameters:
      range - the Range to limit the value (or its size).
      Returns:
      this build instance for fluent API calls.
      See Also:
    • range

      public SELF range(V min, V max)
      Parameters:
      min - the minimum value.
      max - the maximum value.
      Returns:
      this build instance for fluent API calls.
      See Also:
    • range

      public SELF range(String min, String max)
      Description copied from class: ObjectValidatorBuilder
      This method allows to define a range in a generic way. If you have a properly typed builder please use more specific methods such as range(io.github.mmm.base.range.Range) instead.
      Specified by:
      range in class ObjectValidatorBuilder<V extends Comparable<?>,PARENT,SELF extends ComparableValidatorBuilder<V,PARENT,SELF>>
      Parameters:
      min - the minimum value allowed or null for no lower bound.
      max - the maximum value allowed or null for no upper bound.
      Returns:
      this build instance for fluent API calls.