Package com.github.scribejava.core.utils
Class Preconditions
- java.lang.Object
-
- com.github.scribejava.core.utils.Preconditions
-
public abstract class Preconditions extends Object
Utils for checking preconditions and invariants
-
-
Constructor Summary
Constructors Constructor Description Preconditions()
-
Method Summary
Modifier and Type Method Description static void
checkEmptyString(String string, String errorMsg)
Checks that a string is not null or emptystatic void
checkNotNull(Object object, String errorMsg)
Checks that an object is not null.static boolean
hasText(String str)
-
-
-
Method Detail
-
checkNotNull
public static void checkNotNull(Object object, String errorMsg)
Checks that an object is not null.- Parameters:
object
- any objecterrorMsg
- 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 stringerrorMsg
- error message- Throws:
IllegalArgumentException
- if the string is null or empty
-
hasText
public static boolean hasText(String str)
-
-