net.twonky
Class StringCheck

java.lang.Object
  extended by net.twonky.StringCheck

public class StringCheck
extends Object


Constructor Summary
StringCheck()
           
 
Method Summary
static Boolean isEmpty(String string)
          Checks if a string is empty.
static Boolean isLower(String string)
          Checks if a string consists of only lower case letters.
static Boolean isUpper(String string)
          Checks if a string consists of only upper case letters.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StringCheck

public StringCheck()
Method Detail

isEmpty

public static Boolean isEmpty(String string)
Checks if a string is empty. The string is considered empty if
  1. it is null
  2. its length is 0
  3. it contains only whitespace

Parameters:
string - the string to check.
Returns:
true if string is empty else false.

isUpper

public static Boolean isUpper(String string)
Checks if a string consists of only upper case letters.

Parameters:
string - the string to check
Returns:
true if string contains only upper case letters else false.

isLower

public static Boolean isLower(String string)
Checks if a string consists of only lower case letters.

Parameters:
string - the string to check
Returns:
true if string contains only lower case letters else false.


Copyright © 2012. All Rights Reserved.