Class Preconditions

java.lang.Object
com.github.scribejava.core.utils.Preconditions

public abstract class Preconditions extends Object
Utils for checking preconditions and invariants
  • Constructor Details

    • Preconditions

      public Preconditions()
  • Method Details

    • checkNotNull

      public static void checkNotNull(Object object, String errorMsg)
      Checks that an object is not null.
      Parameters:
      object - any object
      errorMsg - error message
      Throws:
      IllegalArgumentException - if the object is null
    • checkEmptyString

      public static void checkEmptyString(String string, String errorMsg)
      Checks that a string is not null or empty
      Parameters:
      string - any string
      errorMsg - error message
      Throws:
      IllegalArgumentException - if the string is null or empty
    • hasText

      public static boolean hasText(String str)