|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.text.Format
org.ifeth.sehr.lib.StringFormat
"String formatter"; format a string to a given maximum length with left, centre, or right justification.
Nested Class Summary |
Nested classes inherited from class java.text.Format |
java.text.Format.Field |
Field Summary | |
static int |
JUST_CENTER
|
static int |
JUST_CENTRE
|
static int |
JUST_LEFT
|
static int |
JUST_RIGHT
Constant for right-justified Strings. |
Constructor Summary | |
StringFormat(int maxChars,
int just)
|
Method Summary | |
java.lang.StringBuffer |
format(java.lang.Object obj,
java.lang.StringBuffer where,
java.text.FieldPosition ignore)
Format a String |
static boolean |
isNULLOrEmpty(java.lang.String s)
Check if a string is null or empty. |
java.lang.Object |
parseObject(java.lang.String arg0,
java.text.ParsePosition arg1)
|
static java.lang.String |
replace(java.lang.String str,
java.lang.String pattern,
java.lang.String replace)
Replaces a substring in a string Usable for JRE 1.4.x because JRE 1.5 can handle this |
static java.lang.String |
trimNULL(java.lang.String s)
Helper method to set 'null' strings to "" strings for a better review from database. |
Methods inherited from class java.text.Format |
clone, format, formatToCharacterIterator, parseObject |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final int JUST_LEFT
public static final int JUST_CENTRE
public static final int JUST_CENTER
public static final int JUST_RIGHT
Constructor Detail |
public StringFormat(int maxChars, int just)
Method Detail |
public java.lang.StringBuffer format(java.lang.Object obj, java.lang.StringBuffer where, java.text.FieldPosition ignore)
public static boolean isNULLOrEmpty(java.lang.String s)
Note: The method is static so it can be used by other classes :)
public static java.lang.String trimNULL(java.lang.String s)
Note: The method is static so it can be used by other classes :)
public static java.lang.String replace(java.lang.String str, java.lang.String pattern, java.lang.String replace)
Usable for JRE 1.4.x because JRE 1.5 can handle this
str
- pattern
- replace
-
public java.lang.Object parseObject(java.lang.String arg0, java.text.ParsePosition arg1)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |