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

io.envoyproxy.pgv.ConstantValidation Maven / Gradle / Ivy

There is a newer version: 1.1.0
Show newest version
package io.envoyproxy.pgv;

/**
 * {@code ConstantValidation} implements PVG validators for constant values.
 */
public final class ConstantValidation {
    private ConstantValidation() {
    }

    public static  void constant(String field, T value, T expected) throws ValidationException {
        if (!value.equals(expected)) {
            throw new ValidationException(field, value, "must equal " + expected.toString());
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy