public class Utils extends Object
This is an internal utility class. No method in this class should be used directly.
Modifier and Type | Method and Description |
---|---|
static Class<?> |
getClass(String className)
Internal utility method.
|
static boolean |
isArrayEqual(Object[] left,
Object[] right)
Internal utility method.
|
static String |
join(Object[] array,
String separator)
Internal utility method.
|
static String |
removeAllWhitespaces(String string)
Internal utility method.
|
static void |
validateIsTrue(boolean expression)
Internal utility method.
|
static void |
validateIsTrue(boolean expression,
String message)
Internal utility method.
|
static void |
validateNotNull(Object object)
Internal utility method.
|
static void |
validateNotNull(Object object,
String message)
Internal utility method.
|
public static void validateNotNull(Object object, String message)
Internal utility method. DO NOT use this method directly.
object
- target objectmessage
- message to be applied to exception if object is nullIllegalArgumentException
- if target is nullpublic static void validateNotNull(Object object)
Internal utility method. DO NOT use this method directly.
object
- target objectIllegalArgumentException
- if target is nullpublic static void validateIsTrue(boolean expression)
Internal utility method. DO NOT use this method directly.
expression
- expression to be validatedIllegalArgumentException
- if expression is falsepublic static void validateIsTrue(boolean expression, String message)
Internal utility method. DO NOT use this method directly.
expression
- expression to be validatedmessage
- message to be applied to the IllegalArgumentException if expression is falseIllegalArgumentException
- if expression is falsepublic static boolean isArrayEqual(Object[] left, Object[] right)
Internal utility method. DO NOT use this method directly.
left
- left side of the comparisonright
- left side of the comparisonpublic static String join(Object[] array, String separator)
Internal utility method. DO NOT use this method directly.
array
- array containing the elements to be joinedseparator
- separator to be used for the joined resultpublic static String removeAllWhitespaces(String string)
Internal utility method. DO NOT use this method directly.
string
- text from which all whitespace will be removedpublic static Class<?> getClass(String className) throws ClassNotFoundException
Internal utility method. DO NOT use this method directly.
className
- the name of the class to be obtainedClassNotFoundException
- if class is not foundCopyright © 2016 The JAVARUNTYPE team. All Rights Reserved.