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

su.boleyn.oj.core.Config Maven / Gradle / Ivy

There is a newer version: 1.1.2
Show newest version
package su.boleyn.oj.core;

public class Config {
	protected static String getOrElse(String name, String defaultValue) {
		return System.getenv().getOrDefault(name, System.getProperty(name, defaultValue));
	}

	protected static String getOrFail(String name) {
		String ret = getOrElse(name, null);
		if (ret == null) {
			throw new RuntimeException(name + " must be set");
		}
		return ret;
	}
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy