objects classes: enable/dissable methods to builder style

This commit is contained in:
Alexander Babai 2016-04-12 23:31:14 +03:00
parent 1232d6f378
commit 94ea153a18

View File

@ -59,28 +59,32 @@ public class InputTextMessageContent implements InputMessageContent {
return this;
}
public void enableMarkdown(boolean enable) {
public InputTextMessageContent enableMarkdown(boolean enable) {
if (enable) {
this.parseMode = ParseMode.MARKDOWN;
} else {
this.parseMode = null;
}
return this;
}
public void enableHtml(boolean enable) {
public InputTextMessageContent enableHtml(boolean enable) {
if (enable) {
this.parseMode = ParseMode.HTML;
} else {
this.parseMode = null;
}
return this;
}
public void disableWebPagePreview() {
public InputTextMessageContent disableWebPagePreview() {
disableWebPagePreview = true;
return this;
}
public void enableWebPagePreview() {
public InputTextMessageContent enableWebPagePreview() {
disableWebPagePreview = null;
return this;
}
@Override