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

io.github.mmm.validation.time.offsetdatetime.ValidatorBuilderOffsetDateTime 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.offsetdatetime;

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

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

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

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

    super(parent);
  }

  @Override
  protected OffsetDateTime parse(String value) {

    return OffsetDateTime.parse(value);
  }

  @Override
  public ValidatorBuilderOffsetDateTime past() {

    return add(new ValidatorOffsetDateTimePast());
  }

  @Override
  public ValidatorBuilderOffsetDateTime future() {

    return add(new ValidatorOffsetDateTimeFuture());
  }

  @Override
  public ValidatorBuilderOffsetDateTime after(OffsetDateTime value) {

    return add(new ValidatorOffsetDateTimeAfter(value));
  }

  @Override
  public ValidatorBuilderOffsetDateTime after(Supplier valueSource) {

    return add(new ValidatorOffsetDateTimeAfter(valueSource));
  }

  @Override
  public ValidatorBuilderOffsetDateTime before(OffsetDateTime value) {

    return add(new ValidatorOffsetDateTimeBefore(value));
  }

  @Override
  public ValidatorBuilderOffsetDateTime before(Supplier valueSource) {

    return add(new ValidatorOffsetDateTimeBefore(valueSource));
  }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy