nl.openedge.baritus.util
Class ValueUtils

java.lang.Object
  extended bynl.openedge.baritus.util.ValueUtils

public final class ValueUtils
extends java.lang.Object

Misc utility methods for handling values

Author:
Eelco Hillenius

Constructor Summary
ValueUtils()
           
 
Method Summary
static java.lang.String convertToString(java.lang.Object value)
          Convert the specified value into a String.
static boolean isNullOrEmpty(java.lang.Object value)
          check if the value is null or empty
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ValueUtils

public ValueUtils()
Method Detail

isNullOrEmpty

public static boolean isNullOrEmpty(java.lang.Object value)
check if the value is null or empty

Parameters:
value - object to check on
Returns:
true if value is not null AND not empty (e.g. in case of a String or Collection)

convertToString

public static java.lang.String convertToString(java.lang.Object value)
Convert the specified value into a String. If the specified value is an array, the first element (converted to a String) will be returned. The registered Converter for the java.lang.String class will be used, which allows applications to customize Object->String conversions (the default implementation simply uses toString()).

Parameters:
value - Value to be converted (may be null)


Copyright © 2003-2004 Open Edge. All Rights Reserved.