Class Utils
java.lang.Object
org.broadinstitute.http.nio.utils.Utils
Generic utility methods.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class
RuntimeException
for parts of the code that should not happen. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic <T> T
Throws anIllegalArgumentException
if the object isnull
.static void
validateArg
(boolean condition, String msg)
-
Constructor Details
-
Utils
private Utils()
-
-
Method Details
-
nonNull
Throws anIllegalArgumentException
if 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
-