Dieser Commit ist enthalten in:
Ursprung
a4ac3fa8f0
Commit
21cb3b266a
@ -50,7 +50,12 @@ public interface AbstractValidator<K, T> {
|
||||
private boolean valid = true;
|
||||
|
||||
public <M> Validator<M> map(Function<C, M> mapper) {
|
||||
return new Validator<>(mapper.apply(value), messageSender).and(ignore -> valid);
|
||||
return new Validator<>(mapper.apply(value), messageSender).set(valid);
|
||||
}
|
||||
|
||||
public Validator<C> set(boolean value) {
|
||||
this.valid = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Validator<C> and(Predicate<C> predicate) {
|
||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren