com.vividsolutions.jump.util
Class LangUtil

java.lang.Object
  extended by com.vividsolutions.jump.util.LangUtil

public class LangUtil
extends java.lang.Object

Utilities to support the Java language.


Constructor Summary
LangUtil()
           
 
Method Summary
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)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LangUtil

public LangUtil()
Method Detail

emptyStringIfNull

public static java.lang.String emptyStringIfNull(java.lang.String s)

ifNull

public 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.


ifNotNull

public static java.lang.Object ifNotNull(java.lang.Object o,
                                         java.lang.Object alternative)

toPrimitiveWrapperClass

public static java.lang.Class toPrimitiveWrapperClass(java.lang.Class primitiveClass)

isPrimitive

public static boolean isPrimitive(java.lang.Class c)

bothNullOrEqual

public static boolean bothNullOrEqual(java.lang.Object a,
                                      java.lang.Object b)

newInstance

public static java.lang.Object newInstance(java.lang.Class c)

classesAndInterfaces

public static java.util.Collection classesAndInterfaces(java.lang.Class c)