uk.ac.ed.inf.utils
Class StringUtils

java.lang.Object
  extended by uk.ac.ed.inf.utils.StringUtils

public class StringUtils
extends java.lang.Object

Class

Version:
11 Mar 2008
Author:
Luna De Ferrari luna.deferrari-at-ed.ac.uk

Constructor Summary
StringUtils()
           
 
Method Summary
static java.lang.String booleanTo01String(java.lang.Boolean booleanValue)
          Returns "1" if Boolean.TRUE, "0" if Boolean.FALSE
static boolean containsPositiveInteger(java.lang.String string)
          Returns true if the string contains a parsable integer
static java.lang.String fromInputStreamToString(java.io.InputStream in)
           
static boolean isDash(java.lang.String string)
          check if the string is a dash
static boolean stringIsNullOrEmpty(java.lang.String string)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StringUtils

public StringUtils()
Method Detail

booleanTo01String

public static java.lang.String booleanTo01String(java.lang.Boolean booleanValue)
Returns "1" if Boolean.TRUE, "0" if Boolean.FALSE

Parameters:
booleanValue -
Returns:
"1" if true, "0" if false

containsPositiveInteger

public static boolean containsPositiveInteger(java.lang.String string)
Returns true if the string contains a parsable integer


fromInputStreamToString

public static java.lang.String fromInputStreamToString(java.io.InputStream in)
                                                throws java.io.IOException
Throws:
java.io.IOException

isDash

public static boolean isDash(java.lang.String string)
check if the string is a dash


stringIsNullOrEmpty

public static boolean stringIsNullOrEmpty(java.lang.String string)
Parameters:
string -
Returns:
true if a string is null or empty