de.uni_paderborn.fujaba.basic
Class Utility

java.lang.Object
  extended byde.uni_paderborn.fujaba.basic.Utility

public class Utility
extends java.lang.Object

this class provides a lot of functions which could be very usefull

Version:
$Revision: 1.26.2.1 $
Author:
$Author: l3_g5 $

Constructor Summary
Utility()
           
 
Method Summary
static java.lang.String downFirstChar(java.lang.String strg)
          This function turns the first character of
static java.lang.String downStart(java.lang.String strg)
          This function turns all the uppercase chars at the beginning of the string up to but not including the last one before a lowercase char.
static boolean isNullOrEmpty(java.lang.String s)
          This function returns true if
static java.lang.String nullIfEmpty(java.lang.String s)
          No comment provided by developer, please add a comment to improve documentation.
static java.lang.String quote(java.lang.String string)
          This function puts '"' around
static java.lang.String textToWidth(java.lang.String text, int width)
          this function shorts the string text to length width
static java.lang.String upFirstChar(java.lang.String strg)
          This function turns the first character of
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Utility

public Utility()
Method Detail

nullIfEmpty

public static java.lang.String nullIfEmpty(java.lang.String s)
No comment provided by developer, please add a comment to improve documentation.

Parameters:
s - No description provided
Returns:
No description provided

isNullOrEmpty

public static boolean isNullOrEmpty(java.lang.String s)
This function returns true if

Parameters:
s - No description provided
Returns:
The nullOrEmpty value

quote

public static java.lang.String quote(java.lang.String string)
This function puts '"' around

Parameters:
string - and returns it, if it's not empty and not null; else it returns the string 'null'.
Returns:
No description provided

upFirstChar

public static java.lang.String upFirstChar(java.lang.String strg)
This function turns the first character of

Parameters:
strg - No description provided
Returns:
No description provided

downFirstChar

public static java.lang.String downFirstChar(java.lang.String strg)
This function turns the first character of

Parameters:
strg - No description provided
Returns:
No description provided

downStart

public static java.lang.String downStart(java.lang.String strg)
This function turns all the uppercase chars at the beginning of the string up to but not including the last one before a lowercase char. The first one is always converted.

For example:


textToWidth

public static java.lang.String textToWidth(java.lang.String text,
                                           int width)
this function shorts the string text to length width

Parameters:
text - the string which should be shorted
width - max length of the returned string
Returns:
a string which has the max. length of width