| Constructor and Description |
|---|
TextBuilder()
Constructs a TextBuilder.
|
| Modifier and Type | Method and Description |
|---|---|
TextBuilder |
append(java.lang.String text)
Appends a text to this TextBuilder.
|
TextBuilder |
append(Text text)
Appends a text to this TextBuilder.
|
TextBuilder |
append(TextBuilder builder)
Appends a text builder to this TextBuilder.
|
TextBuilder |
appendBold(java.lang.String text)
Appends a bold text to this TextBuilder.
|
TextBuilder |
appendBotCommand(java.lang.String botCommand)
Appends a bot command to this TextBuilder.
|
TextBuilder |
appendCashtag(java.lang.String cashtag)
Appends a cashtag to this TextBuilder.
|
TextBuilder |
appendCode(java.lang.String text)
Appends a code text to this TextBuilder.
|
TextBuilder |
appendCodeBlock(java.lang.String text)
Appends a code block text to this TextBuilder.
|
TextBuilder |
appendEmail(java.lang.String email)
Appends an email to this TextBuilder.
|
TextBuilder |
appendHashtag(java.lang.String hashtag)
Appends an hashtag to this TextBuilder.
|
TextBuilder |
appendItalic(java.lang.String text)
Appends a italic text to this TextBuilder.
|
TextBuilder |
appendLink(Link link)
Appends a link to this TextBuilder.
|
TextBuilder |
appendLink(java.lang.String text,
java.lang.String url)
Appends a link to this TextBuilder.
|
TextBuilder |
appendMention(java.lang.String text)
Appends a mention to this TextBuilder.
|
TextBuilder |
appendMention(java.lang.String text,
long mention)
Deprecated.
use this method only if you can't
obtain the user relative to its id
|
TextBuilder |
appendMention(User mention)
Appends a mention to this TextBuilder, or a text mention
if the username is not available.
|
TextBuilder |
appendPhoneNumber(java.lang.String phoneNumber)
Appends a phone number to this TextBuilder.
|
TextBuilder |
appendTextMention(Mention mention)
Appends a text mention to this TextBuilder.
|
TextBuilder |
appendTextMention(java.lang.String text,
User mention)
Appends a text mention to this TextBuilder.
|
TextBuilder |
appendTextMention(User mention)
Appends a text mention to this TextBuilder.
|
TextBuilder |
appendUrl(java.lang.String url)
Appends a bot command to this TextBuilder.
|
Text |
build()
Builds the Text.
|
int |
length()
Returns the length of the text.
|
void |
setLength(int length)
Sets the length of the text.
|
public TextBuilder append(java.lang.String text)
text - the text to appendpublic TextBuilder append(Text text)
text - the text to appendpublic TextBuilder append(TextBuilder builder)
builder - the builder to appendpublic TextBuilder appendBold(java.lang.String text)
text - the text to appendpublic TextBuilder appendItalic(java.lang.String text)
text - the text to appendpublic TextBuilder appendCode(java.lang.String text)
text - the text to appendpublic TextBuilder appendCodeBlock(java.lang.String text)
text - the text to appendpublic TextBuilder appendLink(Link link)
link - the link to appendpublic TextBuilder appendLink(java.lang.String text, java.lang.String url)
text - the text of the linkurl - the url of the linkpublic TextBuilder appendMention(java.lang.String text)
text - the username to mention, without @public TextBuilder appendMention(User mention)
mention - mentioned userpublic TextBuilder appendTextMention(Mention mention)
mention - the mentioned to appendpublic TextBuilder appendTextMention(java.lang.String text, User mention)
text - the text of the mentionmention - the mentionpublic TextBuilder appendTextMention(User mention)
mention - the mentioned userpublic TextBuilder appendHashtag(java.lang.String hashtag)
hashtag - the hashtag to append, without #public TextBuilder appendBotCommand(java.lang.String botCommand)
botCommand - the bot command to append, without /public TextBuilder appendUrl(java.lang.String url)
url - the url to appendpublic TextBuilder appendEmail(java.lang.String email)
email - the email to appendpublic TextBuilder appendPhoneNumber(java.lang.String phoneNumber)
phoneNumber - the phone number to appendpublic TextBuilder appendCashtag(java.lang.String cashtag)
cashtag - the cashtag to append@Deprecated public TextBuilder appendMention(java.lang.String text, long mention)
text - the text of the mentionmention - the id of the mentioned userpublic int length()
public void setLength(int length)
length - the new lengthjava.lang.StringIndexOutOfBoundsException - if the newLength argument is negative.public Text build()