Package com.im.commons.base
Class IJCPreconditions
- java.lang.Object
-
- com.im.commons.base.IJCPreconditions
-
public final class IJCPreconditions extends java.lang.Object
Additional preconditions used within IJC code-base. SeePreconditions
for Guava ones.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static java.lang.Iterable<?>
checkNonNullValues(java.lang.Iterable<?> c, java.lang.Object errorMessage)
Ensures that no value in the given map is anull
reference.static java.util.Map<?,?>
checkNonNullValues(java.util.Map<?,?> map, java.lang.Object errorMessage)
Ensures that no value in the given map is anull
reference.
-
-
-
Method Detail
-
checkNonNullValues
public static java.util.Map<?,?> checkNonNullValues(java.util.Map<?,?> map, java.lang.Object errorMessage) throws java.lang.NullPointerException
Ensures that no value in the given map is anull
reference.- Parameters:
map
- map whose values are to be validatederrorMessage
- the exception message to use if the check fails; will be converted to a string usingString.valueOf(Object)
- Returns:
- the validated map
- Throws:
java.lang.NullPointerException
- if any value in the map is anull
reference
-
checkNonNullValues
public static java.lang.Iterable<?> checkNonNullValues(java.lang.Iterable<?> c, java.lang.Object errorMessage) throws java.lang.NullPointerException
Ensures that no value in the given map is anull
reference.- Parameters:
c
- collection to be checkederrorMessage
- the exception message to use if the check fails; will be converted to a string usingString.valueOf(Object)
- Returns:
- the validated collection
- Throws:
java.lang.NullPointerException
- if any value in the collection is anull
reference
-
-