All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.github.mmm.validation.number.ValidatorBuilderInteger Maven / Gradle / Ivy

The newest version!
/* Copyright (c) The m-m-m Team, Licensed under the Apache License, Version 2.0
 * http://www.apache.org/licenses/LICENSE-2.0 */
package io.github.mmm.validation.number;

/**
 * The {@link NumberValidatorBuilder Validator builder} for {@link Integer} values.
 *
 * @param  the generic type of the {@link #and() parent builder}.
 *
 * @since 1.0.0
 */
public class ValidatorBuilderInteger
    extends NumberValidatorBuilder> {

  /**
   * The constructor.
   *
   * @param parent the {@link #and() parent} builder.
   */
  public ValidatorBuilderInteger(PARENT parent) {

    super(parent);
  }

  /**
   * @see #range(io.github.mmm.base.range.Range)
   *
   * @param min the minimum allowed value.
   * @param max the maximum allowed value.
   * @return this build instance for fluent API calls.
   */
  public ValidatorBuilderInteger range(int min, int max) {

    return range(Integer.valueOf(min), Integer.valueOf(max));
  }

  @Override
  protected Integer parse(String string) {

    return Integer.valueOf(string);
  }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy