package io.particle.android.sdk.utils;

/**
 * Like Guava's Preconditions, but without the overwhelming method count cost
 */
public class Preconditions {

    public static void checkArgument(boolean condition, String errorMessage) {
        if (!condition) {
            throw new IllegalArgumentException(String.valueOf(errorMessage));
        }
    }

}

package io.particle.android.sdk.utils;

import android.support.annotation.Nullable;

/**
 * Like Guava's Preconditions, but without the overwhelming method count cost
 */
public class Preconditions {

    public static void checkArgument(boolean condition, String errorMessage) {
        if (!condition) {
            throw new IllegalArgumentException(String.valueOf(errorMessage));
        }
    }


    public static <T> T checkNotNull(T reference) {
        if (reference == null) {
            throw new NullPointerException();
        }
        return reference;
    }


    public static <T> T checkNotNull(T reference, @Nullable Object errorMessage) {
        if (reference == null) {
            throw new NullPointerException(String.valueOf(errorMessage));
        }
        return reference;
    }
}

Include a couple more Preconditions methods, needed by the setup lib