All Downloads are FREE. Search and download functionalities are using the official Maven repository.

play.data.validation.Check Maven / Gradle / Ivy

There is a newer version: 1.5.0
Show newest version
package play.data.validation;

public abstract class Check {

    public CheckWithCheck checkWithCheck;

    public Check() {

    }

    public abstract boolean isSatisfied(Object validatedObject, Object value);

    public void setMessage(String message, String... vars) {
        checkWithCheck.setMessage(message);
        checkWithCheck.variables.clear();
        for (int i = 0; i < vars.length; i++) {
            checkWithCheck.variables.put("var" + i, vars[i]);
        }
        checkWithCheck.setVariables();
    }

    public CheckWithCheck getCheckWithCheck() {
        return this.checkWithCheck;
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy