Class StreamletUtils
- java.lang.Object
-
- org.apache.heron.streamlet.impl.utils.StreamletUtils
-
public final class StreamletUtils extends Object
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static String
checkNotBlank(String text, String errorMessage)
Verifies not blank text as the utility function.static <T> T
checkNotNull(T reference, String errorMessage)
Verifies not null reference as the utility function.static void
require(Boolean requirement, String errorMessage)
Verifies the requirement as the utility function.
-
-
-
Method Detail
-
require
public static void require(Boolean requirement, String errorMessage)
Verifies the requirement as the utility function.- Parameters:
requirement
- The requirement to verifyerrorMessage
- The error message- Throws:
IllegalArgumentException
- if the requirement fails
-
checkNotBlank
public static String checkNotBlank(String text, String errorMessage)
Verifies not blank text as the utility function.- Parameters:
text
- The text to verifyerrorMessage
- The error message- Throws:
IllegalArgumentException
- if the requirement fails
-
checkNotNull
public static <T> T checkNotNull(T reference, String errorMessage)
Verifies not null reference as the utility function.- Parameters:
reference
- The reference to verifyerrorMessage
- The error message- Throws:
NullPointerException
- if the requirement fails
-
-