mirror of
https://github.com/KAMKEEL/CustomNPC-Plus.git
synced 2026-11-24 21:04:27 +00:00
Move classes around
This commit is contained in:
1 parent
3ea6303fc3
commit
a1549abff1
9 files changed
+18
-16
No files matched your search
@@ -0,0 +1,27 @@
|
||||
package somehussar.gui.annotationHandling;
|
||||
|
||||
public final class FieldConstraints {
|
||||
|
||||
private static final FieldConstraints EMPTY =
|
||||
new FieldConstraints(new FieldConstraint[0]);
|
||||
|
||||
private final FieldConstraint[] constraints;
|
||||
|
||||
public FieldConstraints(FieldConstraint[] constraints) {
|
||||
this.constraints = constraints;
|
||||
}
|
||||
|
||||
public static FieldConstraints empty() {
|
||||
return EMPTY;
|
||||
}
|
||||
|
||||
public void validate(Object value) {
|
||||
for (FieldConstraint c : constraints) {
|
||||
c.validate(value);
|
||||
}
|
||||
}
|
||||
|
||||
public boolean isEmpty() {
|
||||
return constraints.length == 0;
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user