package io.apptik.widget;
public class Util {
private Util() {}
/**
* Returns {@code o} if non-null, or throws {@code NullPointerException}.
*/
public static <T> T requireNonNull(T o) {
if (o == null) {
throw new NullPointerException();
}
return o;
}
/**
* Returns {@code o} if non-null, or throws {@code NullPointerException}
* with the given detail message.
*/
public static <T> T requireNonNull(T o, String message) {
if (o == null) {
throw new NullPointerException(message);
}
return o;
}
}