|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--xbn.XBNObject | +--xbn.string.escape.ESConfig
Configuration for EscapeString. See EscapeString.
Source code: ESConfig.java
Fields inherited from class xbn.XBNObject |
bFALSE_IN_PRODUCTION, bTRUE_IN_PRODUCTION, sCNSTR, sES, sLINE_SEP |
Constructor Summary | |
ESConfig()
Create an ESConfig with default values. |
|
ESConfig(char c_escape)
Create an ESConfig. |
|
ESConfig(char[] ac_toEscape)
Create an ESConfig. |
|
ESConfig(char c_escape,
char[] ac_toEscape)
Create an ESConfig. |
|
ESConfig(ESConfig es_config)
Create a full (deep) copy of the provided ESConfig. |
Method Summary | |
APChar |
getAPCToEscape()
Get the array of chars that must be escaped by getEscapeChar, as an APChar. |
char |
getEscapeChar()
Get the escape character. |
String |
getEscapeCharAsString()
Get the escape character, translated to a string. |
static char |
getEscapeCharDefault()
When none is provided, what is the escape character used by default? |
boolean |
isToBeEscaped(char c_har)
Is the provided character one that should be escaped? |
String |
toString()
Get some information about this ESConfig. |
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 ESConfig()
Create an ESConfig with default values.
Equal to ESConfig(getEscapeCharDefault())
public ESConfig(char c_escape)
Create an ESConfig.
Equal to ESConfig(c_escape, (new char[] {}))
public ESConfig(char[] ac_toEscape)
Create an ESConfig.
Equal to ESConfig(getEscapeCharDefault(), ac_toEscape)
public ESConfig(char c_escape, char[] ac_toEscape)
Create an ESConfig.
c_escape
- The escape character.ac_toEscape
- The array of charcters that can be escaped by c_escape (in addition to c_escape). Must be non-null. If at least one element in length, it must be ordered ascending, and its elements must be unique and not equal to c_escape. If zero elements in length, then c_escape may only escape itself.public ESConfig(ESConfig es_config)
Create a full (deep) copy of the provided ESConfig.
es_config
- The ESConfig to copy. May not be null.Method Detail |
public final char getEscapeChar()
Get the escape character.
public final String getEscapeCharAsString()
Get the escape character, translated to a string.
(new Character(c_escape)).toString()
Where c_escape is exactly as provided to the constructor. Note: This translation only happens once, in the constructor.public final APChar getAPCToEscape()
Get the array of chars that must be escaped by getEscapeChar, as an APChar.
(new APChar(ac_toEscape))
Where ac_toEscape is exactly as provided to the constructor. Note that the APChar object is only created once.public final boolean isToBeEscaped(char c_har)
Is the provided character one that should be escaped?
(Arrays.binarySearch(ac_toEscape, c_har) > -1)
, where ac_toEscape is exactly as provided to the constructor.public String toString()
Get some information about this ESConfig.
toString
in class Object
public static final char getEscapeCharDefault()
When none is provided, what is the escape character used by default?
|
|||||||||
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