@ThreadRestricted public final class ReplyBuilder extends BundleFormatter implements Appendable
BundleFormatter.GProvider| Modifier and Type | Field and Description |
|---|---|
static int |
WRAPPED_WIDTH
Maximum width of wrapped text, in 'columns'.
|
ASSUMED_PACKAGE_PREFIX, bundle, formatter| Constructor and Description |
|---|
ReplyBuilder(Locale l)
Constructs a command/response (CR) ReplyBuilder, for building a reply
to a command.
|
ReplyBuilder(ResourceBundle bundle)
Constructs a ReplyBuilder.
|
| Modifier and Type | Method and Description |
|---|---|
ReplyBuilder |
append(char c)
Appends the specified character to the buffer.
|
ReplyBuilder |
append(CharSequence csq)
Appends the specified character sequence to the buffer.
|
ReplyBuilder |
append(CharSequence csq,
int start,
int end)
Appends a subsequence of the specified character sequence
to the buffer.
|
ReplyBuilder |
append(int i)
Appends the string representation of the specified integer to the buffer.
|
ReplyBuilder |
append(long l)
Appends the string representation of the specified long integer to the buffer.
|
ReplyBuilder |
appendln()
Appends a newline.
|
ReplyBuilder |
appendln(char c)
Appends the specified character, plus a newline,
to the buffer.
|
ReplyBuilder |
appendln(CharSequence csq)
Appends the specified character sequence, plus a newline,
to the buffer.
|
ReplyBuilder |
appendlnn()
Appends a double newline.
|
ReplyBuilder |
appendlnn(CharSequence csq)
Appends the specified character sequence, plus a double newline,
to the buffer.
|
ReplyBuilder |
appendRepeat(char c,
int n)
Appends n copies of character c to the buffer.
|
ReplyBuilder |
appendRepeatln(char c,
int n)
Appends n copies of character c, plus a newline, to the buffer.
|
ReplyBuilder |
appendRepeatlnn(char c,
int n)
Appends n copies of character c, plus a double newline, to the buffer.
|
ReplyBuilder |
chomplnn()
Chops any trailing double newline down to a single newline.
|
ReplyBuilder |
exdent(int amount)
Decreases the left wrap-margin, undoing a previous indent.
|
ReplyBuilder |
indent(int amount)
Appends some spaces, and increases the left wrap-margin accordingly.
|
boolean |
isWrapping()
Returns true if wrapping is enabled; false otherwise.
|
ReplyBuilder |
lappend(String key,
Object... args)
Appends a localized string to the buffer.
|
ReplyBuilder |
lappendln(String key,
Object... args)
Appends a localized string, plus a newline, to the buffer.
|
ReplyBuilder |
lappendlnn(String key,
Object... args)
Appends a localized string, plus a double newline, to the buffer.
|
int |
length()
Returns the current length (character count) of the buffer.
|
ReplyBuilder |
resetFormattingToDefaults()
Set indentation and wrapping to defaults.
|
ReplyBuilder |
setWrapping(boolean toWrap)
Sets whether wrapping is enabled.
|
String |
toString()
Returns the reply as constructed in the buffer, to this point.
|
bundle, format, l, locale, stringBuilderpublic static final int WRAPPED_WIDTH
isWrapping,
Constant Field Valuespublic ReplyBuilder(ResourceBundle bundle)
bundle - the resource bundle to use, per bundle()public ReplyBuilder(Locale l)
l - locale, per locale()public ReplyBuilder append(int i)
public ReplyBuilder append(long l)
public ReplyBuilder appendln()
public ReplyBuilder appendlnn()
public ReplyBuilder appendRepeat(char c, int n)
public ReplyBuilder appendRepeatln(char c, int n)
public ReplyBuilder appendRepeatlnn(char c, int n)
public ReplyBuilder chomplnn()
public ReplyBuilder exdent(int amount)
indent(int)public ReplyBuilder indent(int amount)
exdent(int)public final boolean isWrapping()
setWrapping(boolean)public final ReplyBuilder setWrapping(boolean toWrap)
isWrappingpublic ReplyBuilder lappend(String key, Object... args)
BundleFormatterlappend in class BundleFormatterkey - bundle key of the stringargs - arguments for insertion in the string,
per format(string,args)public ReplyBuilder lappendln(String key, Object... args)
public ReplyBuilder lappendlnn(String key, Object... args)
public int length()
public final ReplyBuilder resetFormattingToDefaults()
indent(int),
isWrappingpublic ReplyBuilder append(char c)
append in interface Appendablepublic ReplyBuilder appendln(char c)
public ReplyBuilder append(CharSequence csq)
append in interface Appendablepublic ReplyBuilder appendln(CharSequence csq)
public ReplyBuilder appendlnn(CharSequence csq)
public ReplyBuilder append(CharSequence csq, int start, int end)
append in interface Appendablepublic String toString()
toString in class Objectchomplnn()