We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7e2efea commit a3ad50bCopy full SHA for a3ad50b
app/src/main/java/hexlet/code/schemas/BaseSchema.java
@@ -5,14 +5,14 @@
5
import java.util.Map;
6
import java.util.function.Predicate;
7
8
-public abstract class BaseSchema<T> {
+public class BaseSchema<T> {
9
private Map<String, Predicate<T>> validations = new HashMap<>();
10
11
protected void addValidation(String key, Predicate<T> validation) {
12
this.validations.put(key, validation);
13
}
14
15
- public boolean isValid(T value) {
+ public final boolean isValid(T value) {
16
if (validations.containsKey("required") && value == null) {
17
return false;
18
0 commit comments