org.apache.servicemix.jbi.deployer.utils
Class StringUtils

java.lang.Object
  extended by org.apache.servicemix.jbi.deployer.utils.StringUtils

public class StringUtils
extends Object


Constructor Summary
StringUtils()
           
 
Method Summary
static boolean hasLength(CharSequence str)
          Check that the given CharSequence is neither null nor of length 0.
static boolean hasLength(String str)
          Check that the given String is neither null nor of length 0.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StringUtils

public StringUtils()
Method Detail

hasLength

public static boolean hasLength(CharSequence str)
Check that the given CharSequence is neither null nor of length 0. Note: Will return true for a CharSequence that purely consists of whitespace.

 StringUtils.hasLength(null) = false
 StringUtils.hasLength("") = false
 StringUtils.hasLength(" ") = true
 StringUtils.hasLength("Hello") = true
 

Parameters:
str - the CharSequence to check (may be null)
Returns:
true if the CharSequence is not null and has length
See Also:
#hasText(String)

hasLength

public static boolean hasLength(String str)
Check that the given String is neither null nor of length 0. Note: Will return true for a String that purely consists of whitespace.

Parameters:
str - the String to check (may be null)
Returns:
true if the String is not null and has length
See Also:
hasLength(CharSequence)


Copyright © 2005-2011 The Apache Software Foundation. All Rights Reserved.