net.fckeditor.tool
Class Utils

java.lang.Object
  extended by net.fckeditor.tool.Utils

public class Utils
extends java.lang.Object

Some static helper methods.

Version:
$Id: Utils.java 3840 2009-07-08 20:29:46Z mosipov $

Constructor Summary
Utils()
           
 
Method Summary
static java.util.Set<java.lang.String> getSet(java.lang.String stringList)
          Just a wrapper to getSet(String, String) for using '|' as delimiter.
static java.util.Set<java.lang.String> getSet(java.lang.String stringList, java.lang.String delimiter)
          Constructs a set of uppercased strings from a delimiter-separated string.
static boolean isBlank(java.lang.String str)
          Checks if a String is whitespace, empty or null.
static boolean isEmpty(java.lang.String str)
          Checks if a string is null or empty.
static boolean isNotBlank(java.lang.String str)
          Just a wrapper to isBlank(String).
static boolean isNotEmpty(java.lang.String str)
          Just a wrapper to isEmpty(String).
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Utils

public Utils()
Method Detail

getSet

public static java.util.Set<java.lang.String> getSet(java.lang.String stringList,
                                                     java.lang.String delimiter)
Constructs a set of uppercased strings from a delimiter-separated string.

Parameters:
stringList -
delimiter - The delimiter.
Returns:
An emtpy list if 'stringList' is empty else a lowercased set of strings.
Throws:
java.lang.IllegalArgumentException - if 'delimiter' is empty.

getSet

public static java.util.Set<java.lang.String> getSet(java.lang.String stringList)
Just a wrapper to getSet(String, String) for using '|' as delimiter.


isEmpty

public static boolean isEmpty(java.lang.String str)
Checks if a string is null or empty.

Parameters:
str - to check
Returns:
true if the string is null or empty.

isNotEmpty

public static boolean isNotEmpty(java.lang.String str)
Just a wrapper to isEmpty(String).

Parameters:
str - to ckeck
Returns:
true if the String is not empty or not null.

isBlank

public static boolean isBlank(java.lang.String str)
Checks if a String is whitespace, empty or null.

Parameters:
str - to check
Returns:
true if the string is null, empty or contains whitespace only.

isNotBlank

public static boolean isNotBlank(java.lang.String str)
Just a wrapper to isBlank(String).

Parameters:
str - to check
Returns:
true if the string is not null, not empty or does not contain whitespace only.


Copyright © 2004-2009 Frederico Caldeira Knabben. All Rights Reserved.