com.github.dreamhead.moco.util.Preconditions Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of moco-core Show documentation
Show all versions of moco-core Show documentation
Moco is an easy setup stub framework, mainly focusing on testing and integration.
package com.github.dreamhead.moco.util;
import static com.google.common.base.Strings.isNullOrEmpty;
public final class Preconditions {
public static String checkNotNullOrEmpty(final String reference, final Object errorMessage) {
if (isNullOrEmpty(reference)) {
throw new IllegalArgumentException(String.valueOf(errorMessage));
}
return reference;
}
private Preconditions() {
}
}