All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.undefinedlabs.scope.utils.Utils Maven / Gradle / Ivy

package com.undefinedlabs.scope.utils;

public final class Utils {

  public static  T checkNotNull(final T arg, final Object errorMessage) {
    if (arg == null) {
      throw new NullPointerException(String.valueOf(errorMessage));
    }
    return arg;
  }

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




© 2015 - 2025 Weber Informatics LLC | Privacy Policy