|
Rational Developer for Power Systems Software V7.6 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.ibm.etools.iseries.util.PaddedStringBuffer
public class PaddedStringBuffer
This class wrappers a StringBuffer and allows additional functionality such as padding the string with spaces, or replacing instances of a substring with another substring. Creation date: (9/26/00 3:43:25 PM)
Field Summary | |
---|---|
static String |
copyRight
|
Constructor Summary | |
---|---|
PaddedStringBuffer(int length)
PaddedStringBuffer constructor for a specified length. |
|
PaddedStringBuffer(String arg1)
PaddedStringBuffer constructor from another String. |
Method Summary | |
---|---|
void |
append(char c)
|
PaddedStringBuffer |
append(char c,
int count)
pad the string on the right |
void |
append(int i)
|
void |
append(long l)
|
void |
append(Object o)
|
void |
append(String s)
|
void |
appendBinaryInt(int i)
|
void |
concat(String s1,
String s2,
String s3)
Insert the method's description here. |
void |
concat(String s1,
String s2,
String s3,
String s4)
Insert the method's description here. |
void |
concat(String s1,
String s2,
String s3,
String s4,
String s5)
Insert the method's description here. |
void |
concat(String s1,
String s2,
String s3,
String s4,
String s5,
String s6)
Insert the method's description here. |
void |
concat(String s1,
String s2,
String s3,
String s4,
String s5,
String s6,
String s7)
Insert the method's description here. |
void |
concat(String s1,
String s2,
String s3,
String s4,
String s5,
String s6,
String s7,
String s8)
Insert the method's description here. |
void |
concat(String s1,
String s2,
String s3,
String s4,
String s5,
String s6,
String s7,
String s8,
String s9)
Insert the method's description here. |
void |
concat(String s1,
String s2,
String s3,
String s4,
String s5,
String s6,
String s7,
String s8,
String s9,
String s10)
Insert the method's description here. |
void |
concat(String s1,
String s2,
String s3,
String s4,
String s5,
String s6,
String s7,
String s8,
String s9,
String s10,
String s11)
Insert the method's description here. |
void |
concat(String s1,
String s2,
String s3,
String s4,
String s5,
String s6,
String s7,
String s8,
String s9,
String s10,
String s11,
String s12)
Insert the method's description here. |
void |
concat(String s1,
String s2,
String s3,
String s4,
String s5,
String s6,
String s7,
String s8,
String s9,
String s10,
String s11,
String s12,
String s13)
Insert the method's description here. |
void |
concat(String s1,
String s2,
String s3,
String s4,
String s5,
String s6,
String s7,
String s8,
String s9,
String s10,
String s11,
String s12,
String s13,
String s14)
Insert the method's description here. |
void |
concat(String s1,
String s2,
String s3,
String s4,
String s5,
String s6,
String s7,
String s8,
String s9,
String s10,
String s11,
String s12,
String s13,
String s14,
String s15)
Insert the method's description here. |
void |
concat(String s1,
String s2,
String s3,
String s4,
String s5,
String s6,
String s7,
String s8,
String s9,
String s10,
String s11,
String s12,
String s13,
String s14,
String s15,
String s16)
Insert the method's description here. |
void |
concat(String s1,
String s2,
String s3,
String s4,
String s5,
String s6,
String s7,
String s8,
String s9,
String s10,
String s11,
String s12,
String s13,
String s14,
String s15,
String s16,
String s17)
Insert the method's description here. |
void |
concat(String s1,
String s2,
String s3,
String s4,
String s5,
String s6,
String s7,
String s8,
String s9,
String s10,
String s11,
String s12,
String s13,
String s14,
String s15,
String s16,
String s17,
String s18)
Insert the method's description here. |
void |
concat(String s1,
String s2,
String s3,
String s4,
String s5,
String s6,
String s7,
String s8,
String s9,
String s10,
String s11,
String s12,
String s13,
String s14,
String s15,
String s16,
String s17,
String s18,
String s19)
Insert the method's description here. |
void |
concat(String s1,
String s2,
String s3,
String s4,
String s5,
String s6,
String s7,
String s8,
String s9,
String s10,
String s11,
String s12,
String s13,
String s14,
String s15,
String s16,
String s17,
String s18,
String s19,
String s20)
Insert the method's description here. |
void |
deleteCharAt(int index)
Delete a char at the specified index |
void |
insert(int index,
char newChar)
Insert a character at the specified index of this string buffer is set to newChar. |
void |
insert(int index,
String newStr)
Insert a String at the specified index of this string buffer is set to newChar. |
boolean |
isAllBlank()
Return true if all the characters are blanks. |
static boolean |
isAllBlank(String string)
Return true if all the characters are blanks. |
boolean |
isAllChar(char c)
Return true if the string is composed entirely of the character specified by the c parameter. |
static boolean |
isAllChar(String str,
char c)
Return true if the string is composed entirely of the character specified by the c parameter. |
boolean |
isAllDBCSBlank()
Return true if all the characters are DBCS blanks. |
boolean |
isAllNumbers()
Return true if all the characters are numbers. |
boolean |
isCharDBCS(int i,
int ccsid)
Return true if the i'th character in the string would be converted to a DBCS character in the CCSID specified by the ccsid parameter. |
boolean |
isEmptyOrBlank()
Returns true if the String is empty or all blanks. |
int |
length()
length of the current string |
PaddedStringBuffer |
padLeft(char c,
int length)
pad the string on the right until it is the specified length |
void |
padLeftAndConcat(String str1,
int len1,
char padChar1,
String str2,
int len2,
char padChar2,
String str3,
int len3,
char padChar3,
String sep)
pad the left side of the string to the specified length, concatenate them and set the value to the current string buffer field |
void |
padLeftAndConcat(String str1,
int len1,
String str2,
int len2,
String str3,
int len3,
String sep,
char padChar)
pad the left side of the string to the specified length, concatenate them and set the value to the current string buffer field |
void |
padLeftOrTruncateToLength(int desiredLength,
char leftPadChar)
If the string is too short, pad left side of the string to the desired length, if it is too long, truncate from the left to the desired length |
PaddedStringBuffer |
padRight(char c,
int targetLength)
pad the string on the right until it is the specified length |
void |
padRightOrTruncateToLength(int desiredLength,
char rightPadChar)
If the string is too short, pad right side oof the string to the desired length, if it is too long, truncate from the right to the desired length |
void |
replace(int begin,
int end,
String replaceString)
|
void |
replace(String newString)
Replace the contents of the entire buffer with the new string |
void |
replaceAndPad(int start,
int end,
String newString,
char paddingChar)
Replace instances of oldSubstring in string str with string newSubstring Creation date: (10/25/00 10:34:22 AM) |
static void |
replaceSubstring(StringBuffer strBuffer,
String str,
String oldSubstring,
String newSubstring)
Replace instances of oldSubstring in string str with string newSubstring Creation date: (10/25/00 10:34:22 AM) |
void |
replaceSubstring(String oldSubstring,
String newSubstring)
Replace instances of oldSubstring in with string newSubstring Creation date: (10/25/00 10:34:22 AM) |
static String |
replaceSubstring(String str,
String oldSubstring,
String newSubstring)
Replace instances of oldSubstring in string str with string newSubstring Creation date: (10/25/00 10:34:22 AM) |
void |
setCharAt(int index,
char newChar)
The character at the specified index of this string buffer is set to newChar. |
void |
setValue(String str)
Assign to this instance the value of the passed String |
void |
setValue(StringBuffer strBuf)
Assign to this instance the value of the passed StringBuffer |
String |
toString()
Return String. |
StringBuffer |
toStringBuffer()
Return StringBuffer. |
void |
toUpperCase()
|
void |
toUpperCaseIgnoreDBCS(int ccsid)
|
int |
truncateAllSpacesFromLeft()
Truncates the SBCS or DBCS spaces from the left of the string. |
void |
truncateAllSpacesFromRight()
Truncates the SBCS or DBCS spaces from the right of the string. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final String copyRight
Constructor Detail |
---|
public PaddedStringBuffer(int length)
length
- intpublic PaddedStringBuffer(String arg1)
arg1
- java.lang.StringMethod Detail |
---|
public void append(char c)
public void append(int i)
public void append(long l)
public void append(Object o)
public void append(String s)
public void replace(int begin, int end, String replaceString)
public void appendBinaryInt(int i)
public void concat(String s1, String s2, String s3, String s4)
public void concat(String s1, String s2, String s3)
public void concat(String s1, String s2, String s3, String s4, String s5)
public void concat(String s1, String s2, String s3, String s4, String s5, String s6)
public void concat(String s1, String s2, String s3, String s4, String s5, String s6, String s7)
public void concat(String s1, String s2, String s3, String s4, String s5, String s6, String s7, String s8)
public void concat(String s1, String s2, String s3, String s4, String s5, String s6, String s7, String s8, String s9)
public void concat(String s1, String s2, String s3, String s4, String s5, String s6, String s7, String s8, String s9, String s10)
public void concat(String s1, String s2, String s3, String s4, String s5, String s6, String s7, String s8, String s9, String s10, String s11)
public void concat(String s1, String s2, String s3, String s4, String s5, String s6, String s7, String s8, String s9, String s10, String s11, String s12)
public void concat(String s1, String s2, String s3, String s4, String s5, String s6, String s7, String s8, String s9, String s10, String s11, String s12, String s13)
public void concat(String s1, String s2, String s3, String s4, String s5, String s6, String s7, String s8, String s9, String s10, String s11, String s12, String s13, String s14)
public void concat(String s1, String s2, String s3, String s4, String s5, String s6, String s7, String s8, String s9, String s10, String s11, String s12, String s13, String s14, String s15)
public void concat(String s1, String s2, String s3, String s4, String s5, String s6, String s7, String s8, String s9, String s10, String s11, String s12, String s13, String s14, String s15, String s16)
public void concat(String s1, String s2, String s3, String s4, String s5, String s6, String s7, String s8, String s9, String s10, String s11, String s12, String s13, String s14, String s15, String s16, String s17)
public void concat(String s1, String s2, String s3, String s4, String s5, String s6, String s7, String s8, String s9, String s10, String s11, String s12, String s13, String s14, String s15, String s16, String s17, String s18)
public void concat(String s1, String s2, String s3, String s4, String s5, String s6, String s7, String s8, String s9, String s10, String s11, String s12, String s13, String s14, String s15, String s16, String s17, String s18, String s19)
public void concat(String s1, String s2, String s3, String s4, String s5, String s6, String s7, String s8, String s9, String s10, String s11, String s12, String s13, String s14, String s15, String s16, String s17, String s18, String s19, String s20)
public boolean isAllBlank()
public static boolean isAllBlank(String string)
public boolean isAllChar(char c)
public static boolean isAllChar(String str, char c)
NullPointerException
- if str is null.public boolean isAllDBCSBlank()
public boolean isCharDBCS(int i, int ccsid)
i
- intccsid
- int
public boolean isEmptyOrBlank()
public PaddedStringBuffer padLeft(char c, int length)
public void padRightOrTruncateToLength(int desiredLength, char rightPadChar)
public void padLeftOrTruncateToLength(int desiredLength, char leftPadChar)
public PaddedStringBuffer padRight(char c, int targetLength)
public PaddedStringBuffer append(char c, int count)
c
- - the character to pad withcount
- - the number of times to append that characterpublic void replaceSubstring(String oldSubstring, String newSubstring)
c
- charrepl
- java.lang.Stringpublic static final String replaceSubstring(String str, String oldSubstring, String newSubstring)
in
- java.lang.Stringc
- charrepl
- java.lang.String
public static final void replaceSubstring(StringBuffer strBuffer, String str, String oldSubstring, String newSubstring)
in
- java.lang.Stringc
- charrepl
- java.lang.Stringpublic void replaceAndPad(int start, int end, String newString, char paddingChar)
in
- java.lang.Stringc
- charrepl
- java.lang.Stringpublic void replace(String newString)
newString
- public void setValue(String str)
strBuf
- java.lang.StringBufferpublic void setValue(StringBuffer strBuf)
strBuf
- java.lang.StringBufferpublic String toString()
toString
in class Object
public StringBuffer toStringBuffer()
public void truncateAllSpacesFromRight()
public int truncateAllSpacesFromLeft()
public void toUpperCaseIgnoreDBCS(int ccsid)
public void toUpperCase()
public boolean isAllNumbers()
public void padLeftAndConcat(String str1, int len1, char padChar1, String str2, int len2, char padChar2, String str3, int len3, char padChar3, String sep)
public void padLeftAndConcat(String str1, int len1, String str2, int len2, String str3, int len3, String sep, char padChar)
public void deleteCharAt(int index)
public void setCharAt(int index, char newChar)
public void insert(int index, char newChar)
public void insert(int index, String newStr)
public int length()
|
Rational Developer for Power Systems Software V7.6 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |