package com.github.davidmoten.rx.jdbc;

/**
 * Utility methods to checking conditions.
 */
final class Conditions {

	/**
	 * Private constructor to prevent instantiation.
	 */
	private Conditions() {
		// prevent instantiation
	}

	/**
	 * If and only if parameter is false throw a {@link RuntimeException}.
	 * 
	 * @param b
	 */
	static void checkTrue(boolean b) {
		if (!b)
			throw new RuntimeException("check failed");
	}

	/**
	 * If and only if parameter is true throw a {@link RuntimeException}.
	 * 
	 * @param b
	 */
	static void checkFalse(boolean b) {
		checkTrue(!b);
	}

	static void checkNotNull(Object obj) {
		if (obj == null)
			throw new NullPointerException("argument cannot be null");
	}

}

@@ -579,16 +579,109 @@
 b);%0A%09%7D%0A%0A
+%09/**%0A%09 * Throws a %7B@link NullPointerException%7D if argument is null.%0A%09 * %0A%09 * @param obj%0A%09 */%0A
 %09static 

add javadoc