Package com.github.scribejava.core.utils
Class Preconditions
java.lang.Object
com.github.scribejava.core.utils.Preconditions
Utils for checking preconditions and invariants
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidcheckEmptyString(String string, String errorMsg) Checks that a string is not null or emptystatic voidcheckNotNull(Object object, String errorMsg) Checks that an object is not null.static boolean
-
Constructor Details
-
Preconditions
public Preconditions()
-
-
Method Details
-
checkNotNull
Checks that an object is not null.- Parameters:
object- any objecterrorMsg- error message- Throws:
IllegalArgumentException- if the object is null
-
checkEmptyString
Checks that a string is not null or empty- Parameters:
string- any stringerrorMsg- error message- Throws:
IllegalArgumentException- if the string is null or empty
-
hasText
-