com.sibvisions.util.type
Class CommonUtil

java.lang.Object
  extended by com.sibvisions.util.type.CommonUtil

public final class CommonUtil
extends Object

The CommonUtil contains utility methods for handling type independent operations.


Method Summary
static String dump(Throwable pCause, boolean pDeep)
          Writes the stack trace of an exception/throwable object into a string.
static
<T> T
nvl(T pValue, T pNvlValue)
          Gets an alternative value for a null object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

dump

public static String dump(Throwable pCause,
                          boolean pDeep)
Writes the stack trace of an exception/throwable object into a string.

Parameters:
pCause - Exception/Throwable (StackTrace)
pDeep - true to dump the trace with all causes; false to dump only the exception
Returns:
stack trace

nvl

public static <T> T nvl(T pValue,
                        T pNvlValue)
Gets an alternative value for a null object.

Type Parameters:
T - parameter type
Parameters:
pValue - desired value
pNvlValue - alternative value
Returns:
pValue or pNvlValue if pValue == null


Copyright © 2009 SIB Visions GmbH. All Rights Reserved.