|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--xbn.XBNObject | +--xbn.string.padchop.PadChopString
Pad and/or chop a string to a specific length. The configuration for this class is held in a PCSConfig.
Source code: PadChopString.java. Example code XmplPadChopString.
Fields inherited from class xbn.XBNObject |
bFALSE_IN_PRODUCTION, bTRUE_IN_PRODUCTION, sCNSTR, sES, sLINE_SEP |
Constructor Summary | |
PadChopString(PCSConfig pcs_config)
Create a PadChopString. |
Method Summary | |
String |
get(boolean b_oolean)
Get a copy of the boolean after it is padded/chopped. |
String |
get(char c_har)
Get a copy of the char after it is padded/chopped. |
String |
get(int i_nt)
Get a copy of the int after it is padded/chopped. |
String |
get(int i_length,
boolean b_oolean)
Get a copy of the boolean after it is padded/chopped. |
String |
get(int i_length,
char c_har)
Get a copy of the char after it is padded/chopped. |
String |
get(int i_length,
int i_nt)
Get a copy of the int after it is padded/chopped. |
String |
get(int i_length,
String s_tr)
Get a copy of the string after it is padded/chopped. |
String |
get(String s_tr)
Get a copy of the string after it is padded/chopped. |
PCSConfig |
getPCSConfig()
Get the PCSConfig for direct manipulation. |
void |
padChop(int i_length,
StringBuffer str_buffer)
Pad/chop the StringBuffer. |
void |
padChop(int i_length,
StringOrBuffer str_orBfr)
Get the padded/chopped StringBuffer, based upon the configuration held in the PCSConfig. |
void |
padChop(StringBuffer str_buffer)
Pad/chop the StringBuffer. |
void |
padChop(StringOrBuffer str_orBfr)
Get the padded/chopped StringBuffer, based upon the configuration held in the PCSConfig. |
void |
setPCSConfig(PCSConfig pcs_config)
Set the configuration defining how the string should be padded/chopped. |
String |
toString()
Get some information about this PadChopString . |
Methods inherited from class xbn.XBNObject |
getXMsgPrefix, sop, sopl, sopl, throwAX, throwAXIfBadStr, throwAXIfNull, throwAXSpoof |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public PadChopString(PCSConfig pcs_config)
Create a PadChopString.
pcs_config
- The configuration for this PadChopString. May not be null. See setPCSConfig.Method Detail |
public final PCSConfig getPCSConfig()
Get the PCSConfig for direct manipulation.
public final void setPCSConfig(PCSConfig pcs_config)
Set the configuration defining how the string should be padded/chopped.
Get with getPCSConfig
pcs_config
- The configuration for this PadChopString. May not be null.public String get(boolean b_oolean)
Get a copy of the boolean after it is padded/chopped.
padChop([UtilString].getSOBS(new Boolean(b_oolean).toString(), "get"))
public String get(char c_har)
Get a copy of the char after it is padded/chopped.
padChop([UtilString].getSOBS(new Character(c_har).toString(), "get"))
public String get(int i_nt)
Get a copy of the int after it is padded/chopped.
padChop([UtilString].getSOBS(new Integer(i_nt).toString(), "get"))
public String get(String s_tr)
Get a copy of the string after it is padded/chopped.
padChop([UtilString].getSOBS(s_tr, "get"))
public void padChop(StringBuffer str_buffer)
Pad/chop the StringBuffer.
Equal to padChop([UtilStringBuffer].getSOBSB(str_buffer, "get")).getStringBuffer()
public void padChop(StringOrBuffer str_orBfr)
Get the padded/chopped StringBuffer, based upon the configuration held in the PCSConfig. See getPCSConfig.
str_buffer
- The StringBuffer to pad or chop.public String get(int i_length, boolean b_oolean)
Get a copy of the boolean after it is padded/chopped.
Before returning, this calls
getPCSConfig().setLength(i_length)
If you don't need to reset the length every time, then use only get.
get(b_oolean)
public String get(int i_length, char c_har)
Get a copy of the char after it is padded/chopped.
Before returning, this calls
getPCSConfig().setLength(i_length)
If you don't need to reset the length every time, then use only get.
get(c_har)
public String get(int i_length, int i_nt)
Get a copy of the int after it is padded/chopped.
Before returning, this calls
getPCSConfig().setLength(i_length)
If you don't need to reset the length every time, then use only get.
get(i_nt)
public String get(int i_length, String s_tr)
Get a copy of the string after it is padded/chopped.
Before returning, this calls
getPCSConfig().setLength(i_length)
If you don't need to reset the length every time, then use only get.
get(s_tr)
public void padChop(int i_length, StringBuffer str_buffer)
Pad/chop the StringBuffer.
Before returning, this calls
getPCSConfig().setLength(i_length)
If you don't need to reset the length every time, then use only padChop.
padChop(str_buffer)
public void padChop(int i_length, StringOrBuffer str_orBfr)
Get the padded/chopped StringBuffer, based upon the configuration held in the PCSConfig.
Before returning, this calls
getPCSConfig().setLength(i_length)
If you don't need to reset the length every time, then use only padChop.
padChop(str_orBfr)
public final String toString()
Get some information about this PadChopString
.
toString
in class Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Copyright 1997-2003, Jeff Epstein, All Rights Reserved. See top of source code files for copyright notice.
http://sourceforge.net/projects/xbnjava