public class RuleBuilderCollectionImpl<T,P> extends Object implements RuleBuilderCollection<T,P>, WhenCollection<T,P>, Rule<T>
| Modifier and Type | Field and Description |
|---|---|
protected String |
fieldName |
protected java.util.function.Function<T,P> |
function |
| Constructor and Description |
|---|
RuleBuilderCollectionImpl(java.util.function.Function<T,Collection<P>> function) |
RuleBuilderCollectionImpl(String fieldName,
java.util.function.Function<T,Collection<P>> function) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
apply(T instance) |
Critical<T,Collection<P>,WhenCollection<T,P>> |
critical() |
Critical<T,Collection<P>,WhenCollection<T,P>> |
critical(Class<? extends ValidationException> clazz) |
Must<T,Collection<P>,WhenCollection<T,P>> |
must(java.util.function.Predicate<Collection<P>> must) |
boolean |
support(T instance) |
WhenCollection<T,P> |
when(java.util.function.Predicate<Collection<P>> when) |
WhenCollection<T,P> |
whenever(java.util.function.Predicate<Collection<P>> whenever) |
Code<T,Collection<P>,WhenCollection<T,P>> |
withCode(String code) |
FieldName<T,Collection<P>,WhenCollection<T,P>> |
withFieldName(String fieldName) |
Message<T,Collection<P>,WhenCollection<T,P>> |
withMessage(String message) |
WithValidator<T,Collection<P>,WhenCollection<T,P>> |
withValidator(Validator<P> validator) |
protected final String fieldName
protected final java.util.function.Function<T,P> function
public RuleBuilderCollectionImpl(String fieldName, java.util.function.Function<T,Collection<P>> function)
public RuleBuilderCollectionImpl(java.util.function.Function<T,Collection<P>> function)
public WhenCollection<T,P> whenever(java.util.function.Predicate<Collection<P>> whenever)
public Must<T,Collection<P>,WhenCollection<T,P>> must(java.util.function.Predicate<Collection<P>> must)
public Message<T,Collection<P>,WhenCollection<T,P>> withMessage(String message)
withMessage in interface Must<T,Collection<P>,WhenCollection<T,P>>withMessage in interface When<T,Collection<P>,WhenCollection<T,P>>public Code<T,Collection<P>,WhenCollection<T,P>> withCode(String code)
withCode in interface Message<T,Collection<P>,WhenCollection<T,P>>withCode in interface When<T,Collection<P>,WhenCollection<T,P>>public FieldName<T,Collection<P>,WhenCollection<T,P>> withFieldName(String fieldName)
withFieldName in interface Code<T,Collection<P>,WhenCollection<T,P>>withFieldName in interface Message<T,Collection<P>,WhenCollection<T,P>>withFieldName in interface When<T,Collection<P>,WhenCollection<T,P>>public Critical<T,Collection<P>,WhenCollection<T,P>> critical()
critical in interface Code<T,Collection<P>,WhenCollection<T,P>>critical in interface FieldName<T,Collection<P>,WhenCollection<T,P>>critical in interface Message<T,Collection<P>,WhenCollection<T,P>>critical in interface When<T,Collection<P>,WhenCollection<T,P>>critical in interface WithValidator<T,Collection<P>,WhenCollection<T,P>>public Critical<T,Collection<P>,WhenCollection<T,P>> critical(Class<? extends ValidationException> clazz)
critical in interface Code<T,Collection<P>,WhenCollection<T,P>>critical in interface FieldName<T,Collection<P>,WhenCollection<T,P>>critical in interface Message<T,Collection<P>,WhenCollection<T,P>>critical in interface When<T,Collection<P>,WhenCollection<T,P>>critical in interface WithValidator<T,Collection<P>,WhenCollection<T,P>>public WithValidator<T,Collection<P>,WhenCollection<T,P>> withValidator(Validator<P> validator)
withValidator in interface WhenCollection<T,P>public WhenCollection<T,P> when(java.util.function.Predicate<Collection<P>> when)
when in interface Must<T,Collection<P>,WhenCollection<T,P>>Copyright © 2019 com.github.mvallim. All rights reserved.