io.github.mmm.validation.time.offsettime.ValidatorBuilderOffsetTime 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.offsettime;
import java.time.OffsetTime;
import java.util.function.Supplier;
import io.github.mmm.validation.time.ValidatorBuilderTemporal;
/**
* {@link ValidatorBuilderTemporal Validator builder} for {@link OffsetTime}.
*
* @param the generic type of the {@link #and() parent builder}.
*
* @since 1.0.0
*/
public class ValidatorBuilderOffsetTime
extends ValidatorBuilderTemporal> {
/**
* The constructor.
*
* @param parent the {@link #and() parent} builder.
*/
public ValidatorBuilderOffsetTime(PARENT parent) {
super(parent);
}
@Override
protected OffsetTime parse(String value) {
return OffsetTime.parse(value);
}
@Override
public ValidatorBuilderOffsetTime past() {
return add(new ValidatorOffsetTimePast());
}
@Override
public ValidatorBuilderOffsetTime future() {
return add(new ValidatorOffsetTimeFuture());
}
@Override
public ValidatorBuilderOffsetTime after(OffsetTime value) {
return add(new ValidatorOffsetTimeAfter(value));
}
@Override
public ValidatorBuilderOffsetTime after(Supplier valueSource) {
return add(new ValidatorOffsetTimeAfter(valueSource));
}
@Override
public ValidatorBuilderOffsetTime before(OffsetTime value) {
return add(new ValidatorOffsetTimeBefore(value));
}
@Override
public ValidatorBuilderOffsetTime before(Supplier valueSource) {
return add(new ValidatorOffsetTimeBefore(valueSource));
}
}