public class LangUtil
extends java.lang.Object
Constructor and Description |
---|
LangUtil() |
Modifier and Type | Method and Description |
---|---|
static boolean |
bothNullOrEqual(java.lang.Object a,
java.lang.Object b) |
static java.util.Collection |
classesAndInterfaces(java.lang.Class c) |
static java.lang.String |
emptyStringIfNull(java.lang.String s) |
static java.lang.Object |
ifNotNull(java.lang.Object o,
java.lang.Object alternative) |
static java.lang.Object |
ifNull(java.lang.Object o,
java.lang.Object alternative)
Useful because an expression used to generate o need only be
evaluated once.
|
static boolean |
isPrimitive(java.lang.Class c) |
static java.lang.Object |
newInstance(java.lang.Class c) |
static java.lang.Class |
toPrimitiveWrapperClass(java.lang.Class primitiveClass) |
public static java.lang.String emptyStringIfNull(java.lang.String s)
public static java.lang.Object ifNull(java.lang.Object o, java.lang.Object alternative)
public static java.lang.Object ifNotNull(java.lang.Object o, java.lang.Object alternative)
public static java.lang.Class toPrimitiveWrapperClass(java.lang.Class primitiveClass)
public static boolean isPrimitive(java.lang.Class c)
public static boolean bothNullOrEqual(java.lang.Object a, java.lang.Object b)
public static java.lang.Object newInstance(java.lang.Class c)
public static java.util.Collection classesAndInterfaces(java.lang.Class c)