
com.workday.autoparse.xml.utils.Preconditions Maven / Gradle / Ivy
/*
* Copyright 2015 Workday, Inc.
*
* This software is available under the MIT license.
* Please see the LICENSE.txt file in this project.
*/
package com.workday.autoparse.xml.utils;
/**
* @author nathan.taylor
* @since 2015-10-23.
*/
public class Preconditions {
private Preconditions() {
}
public static void checkArgument(boolean condition, String message) {
if (!condition) {
throw new IllegalArgumentException(message);
}
}
public static void checkNotNull(Object reference, String message) {
if (reference == null) {
throw new NullPointerException(message);
}
}
public static void checkState(boolean condidtion, String message) {
if (!condidtion) {
throw new IllegalStateException(message);
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy