public static <T> T checkNotNull(T ref, String msg, Object... args) {
    """
	Checks that the given reference is not {@code null} and returns it
	in case of success.
	
	@param <T> the type of the given reference.
	@param ref the reference to test.
	@param msg the error message format string.
	@param args the error message arguments.
	
	@return the validated (non-{@code null}) reference.
	
	@throws NullPointerException if the given reference is {@code null}.
    """
		if (ref == null) {
			throw new NullPointerException(format(msg, args));
		}
		return ref;
	}
public static <T> T checkNotNull(T ref, String msg, Object... args)
	{
		if (ref == null) {
			throw new NullPointerException(format(msg, args));
		}
		return ref;
	}
public static < T > T checkNotNull ( T ref , String msg , Object ... args ) { if ( ref == null ) { throw new NullPointerException ( format ( msg , args ) ) ; } return ref ; }
Checks that the given reference is not {@code null} and returns it
in case of success.

@param <T> the type of the given reference.
@param ref the reference to test.
@param msg the error message format string.
@param args the error message arguments.

@return the validated (non-{@code null}) reference.

@throws NullPointerException if the given reference is {@code null}.
Checks that the given reference is not { @code null } and returns it in case of success .