net.sf.mmm.util.validation.base.CompareableValidatorBuilder Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of mmm-util-validation Show documentation
Show all versions of mmm-util-validation Show documentation
This project provides advanced validation support.
/* Copyright (c) The m-m-m Team, Licensed under the Apache License, Version 2.0
* http://www.apache.org/licenses/LICENSE-2.0 */
package net.sf.mmm.util.validation.base;
import java.util.Collection;
import net.sf.mmm.util.validation.base.collection.ValidatorCollectionSize;
import net.sf.mmm.util.value.api.Range;
/**
* The {@link ObjectValidatorBuilder builder} of {@link AbstractValidator} for {@link Comparable} values.
*
* @param the generic type of the value to {@link AbstractValidator#validate(Object) validate}.
* @param the generic type of the {@link #and() parent builder}.
* @param the generic type of this builder itself (this).
*
* @author hohwille
* @since 7.1.0
*/
@SuppressWarnings("rawtypes")
public abstract class CompareableValidatorBuilder>
extends ObjectValidatorBuilder {
/**
* The constructor.
*
* @param parent the {@link #and() parent} builder.
*/
public CompareableValidatorBuilder(PARENT parent) {
super(parent);
}
/**
* @see ValidatorCollectionSize
*
* @param range the {@link Range} to limit the {@link Collection#size() size} of the {@link Collection}.
* @return this build instance for fluent API calls.
*/
public SELF range(Range range) {
return add(new ValidatorRange<>(range));
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy