|
PAJES 2.3.9 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.pajes.util.QuotedString
Utility class for returning an appropriately constructed and escaped quoted string.
| Field Summary | |
static char |
DOUBLE_QUOTE
The double quote character (") |
static char |
SINGLE_QUOTE
The single quote character (') |
| Constructor Summary | |
QuotedString()
Creates an empty quoted string. |
|
QuotedString(java.lang.String unquotedString)
Creates a string surrounded with appropriate quote characters. |
|
QuotedString(java.lang.String unquotedString,
boolean doubleQuotes)
Creates a string surrounded by the specifed quotes. |
|
QuotedString(java.lang.String unquotedString,
boolean doubleQuotes,
boolean replaceQuotes)
Creates a string surrounded by the specifed quotes. |
|
| Method Summary | |
QuotedString |
setAutoQuotes()
Specifies that the string will be surrounded with appropriate quote characters. |
QuotedString |
setDoubleQuotes()
Specifies that the string must be enclosed in double quotes. |
QuotedString |
setEncodeCharacterEntities(boolean encode)
Determines whether any special HTML characters in the text are to be converted to their equivalent HTML named character entity. |
QuotedString |
setEscapeCharacter(char escapeCharacter)
Sets the escape character to prefix a quote contained within the quoted string. |
QuotedString |
setReplaceQuotes(boolean replace)
Determines whether any quotes within the string are to be replaced with the alternate quoting character. |
QuotedString |
setSingleQuotes()
Specifies that the string must be enclosed in single quotes. |
QuotedString |
setString(java.lang.String unquotedString)
Specifies the unquoted string to be placed in quotes. |
java.lang.String |
toString()
Over-rides the toString() method from Object to return the unquoted string appropriately quoted. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
public static final char DOUBLE_QUOTE
public static final char SINGLE_QUOTE
| Constructor Detail |
public QuotedString()
public QuotedString(java.lang.String unquotedString)
If the string contains both single and double quote characters, the
string will be enclosed in single quotes ('), and any single quotes in
the string will be prefixed by the escape
character.
unquotedString - the string that is to be enclosed in quotes.
public QuotedString(java.lang.String unquotedString,
boolean doubleQuotes)
escape
character.
unquotedString - the string that is to be enclosed in quotes.doubleQuotes - true if the string is to be enclosed in double quote
characters ("), or false if single quotes (') are to be used.
public QuotedString(java.lang.String unquotedString,
boolean doubleQuotes,
boolean replaceQuotes)
unquotedString - the string that is to be enclosed in quotes.doubleQuotes - true if the string is the be enclosed in double
quote characters ("), or false if single quotes (') are to be
used.replaceQuotes - true means that any quotes within the string will
be replaced by the alternate quote character before enclosing
the value in quotes.| Method Detail |
public QuotedString setAutoQuotes()
public QuotedString setDoubleQuotes()
public QuotedString setEncodeCharacterEntities(boolean encode)
false for historical compatability.
encode - true if any special HTML characters in the text are to be
converted to their equivalent HTML named character entity, or
false if no changes are to be made to the text.
Text.encodeCharacterEntities(java.lang.String)public QuotedString setEscapeCharacter(char escapeCharacter)
escapeCharacter - the character to use to escape any quotes found
within the qouted string.
public QuotedString setReplaceQuotes(boolean replace)
replace - true means that any quotes within the string will be
replaced by the alternate quote character before enclosing the
value in quotes.
public QuotedString setSingleQuotes()
public QuotedString setString(java.lang.String unquotedString)
unquotedString - the string that is to be enclosed in quotes.
public java.lang.String toString()
unquoted string appropriately quoted.
|
PAJES 2.3.9 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||