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

io.activej.json.JsonValidationUtils Maven / Gradle / Ivy

The newest version!
package io.activej.json;

import org.jetbrains.annotations.Nullable;

public class JsonValidationUtils {

	public static  T validateNotNull(@Nullable T reference) throws JsonValidationException {
		if (reference != null) {
			return reference;
		}
		throw new JsonValidationException();
	}

	public static void validateArgument(boolean expression) throws JsonValidationException {
		if (!expression) {
			throw new JsonValidationException();
		}
	}

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy