Class ObjectValidatorBuilder<V,​PARENT,​SELF extends ObjectValidatorBuilder<V,​PARENT,​SELF>>

    • Constructor Detail

      • ObjectValidatorBuilder

        public ObjectValidatorBuilder​(PARENT parent)
        The constructor.
        Parameters:
        parent - the parent builder.
    • Method Detail

      • and

        public PARENT and()
        Returns:
        the parent Builder or null if <PARENT> is void.
      • self

        protected SELF self()
        Returns:
        this build instance for fluent API calls.
      • mandatory

        public SELF mandatory()
        Value is mandatory.
        Returns:
        this build instance for fluent API calls.
      • min

        public SELF min​(String min)
        This method allows to define a minimum. Values exceeding this minimum will be invalid. Avoid using min(String) and max(String) and use range(String, String) in such case.
        Parameters:
        min - the minimum value allowed.
        Returns:
        this build instance for fluent API calls.
      • max

        public SELF max​(String max)
        This method allows to define a maximum. Values exceeding this maximum will be invalid.
        Parameters:
        max - the maximum value allowed.
        Returns:
        this build instance for fluent API calls.
      • range

        public abstract SELF range​(String min,
                                   String max)
        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 ComparableValidatorBuilder.range(io.github.mmm.base.range.Range) instead.
        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.
      • build

        public Validator<? super V> build()
        Description copied from interface: Builder
        Creates a new instance of the object to build. If the Builder is reused, any additional changes to the Builder shall NOT have any effect on instances previously returned by this method.
        Specified by:
        build in interface Builder<V>
        Returns:
        the AbstractValidator