Class Utils
java.lang.Object
org.broadinstitute.http.nio.utils.Utils
Generic utility methods.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classRuntimeExceptionfor parts of the code that should not happen. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic <T> TThrows anIllegalArgumentExceptionif the object isnull.static voidvalidateArg(boolean condition, String msg)
-
Constructor Details
-
Utils
private Utils()
-
-
Method Details
-
nonNull
Throws anIllegalArgumentExceptionif the object isnull.- Type Parameters:
T- type of the object.- Parameters:
o- object to test.msg- message for the exception.- Returns:
- the same object if not
null. - Throws:
IllegalArgumentException- if the object isnull.
-
validateArg
- Parameters:
condition- throw an Illegal argument exception if !conditionmsg- the error message when the condition is not met
-