Class ValidationUtils

java.lang.Object
com.cloudera.cdp.ValidationUtils

public class ValidationUtils extends Object
Class containing validation utilty methods.
  • Method Details

    • checkStateAndThrow

      public static void checkStateAndThrow(boolean expr)
      Like checkState, but throws an CdpClientException.
      Parameters:
      expr - a boolean expression
    • checkArgumentAndThrow

      public static void checkArgumentAndThrow(boolean expr)
      Like checkArgument, but throws an CdpClientException.
      Parameters:
      expr - a boolean expression
    • checkNotNullAndThrow

      public static <T> T checkNotNullAndThrow(T ref)
      Like checkNotNull, but throws an CdpClientException.
      Type Parameters:
      T - The type of the object
      Parameters:
      ref - an object reference
      Returns:
      the non-null reference that was validated