remove NotNullValidator

This commit is contained in:
dfsek
2021-05-11 23:56:08 -07:00
parent 0ab949174a
commit 32db83f091
4 changed files with 12 additions and 14 deletions
@@ -1,8 +0,0 @@
package com.dfsek.terra.api.transform;
public class NotNullValidator<T> implements Validator<T> {
@Override
public boolean validate(T value) {
return !(value == null);
}
}
@@ -1,6 +1,12 @@
package com.dfsek.terra.api.transform;
import java.util.Objects;
public interface Validator<T> {
boolean validate(T value) throws TransformException;
static <T> Validator<T> notNull() {
return Objects::nonNull;
}
}