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

io.github.mmm.validation.time.localdatetime.ValidatorBuilderLocalDateTime 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.time.localdatetime;

import java.time.LocalDateTime;
import java.util.function.Supplier;

import io.github.mmm.validation.time.ValidatorBuilderTemporal;

/**
 * {@link ValidatorBuilderTemporal Validator builder} for {@link LocalDateTime}.
 *
 * @param  the generic type of the {@link #and() parent builder}.
 *
 * @since 1.0.0
 */
public class ValidatorBuilderLocalDateTime
    extends ValidatorBuilderTemporal> {

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

    super(parent);
  }

  @Override
  protected LocalDateTime parse(String value) {

    return LocalDateTime.parse(value);
  }

  @Override
  public ValidatorBuilderLocalDateTime past() {

    return add(new ValidatorLocalDateTimePast());
  }

  @Override
  public ValidatorBuilderLocalDateTime future() {

    return add(new ValidatorLocalDateTimeFuture());
  }

  @Override
  public ValidatorBuilderLocalDateTime after(LocalDateTime value) {

    return add(new ValidatorLocalDateTimeAfter(value));
  }

  @Override
  public ValidatorBuilderLocalDateTime after(Supplier valueSource) {

    return add(new ValidatorLocalDateTimeAfter(valueSource));
  }

  @Override
  public ValidatorBuilderLocalDateTime before(LocalDateTime value) {

    return add(new ValidatorLocalDateTimeBefore(value));
  }

  @Override
  public ValidatorBuilderLocalDateTime before(Supplier valueSource) {

    return add(new ValidatorLocalDateTimeBefore(valueSource));
  }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy