From 0dfddc7f2de3881d96eebbc9bb4a742573ea6b83 Mon Sep 17 00:00:00 2001 From: Mark Struchkov Date: Tue, 21 May 2019 00:20:21 +0300 Subject: [PATCH] =?UTF-8?q?=D0=A3=D0=B1=D1=80=D0=B0=D0=BB=20=D1=8E=D0=BD?= =?UTF-8?q?=D0=B8=D1=82=20=D1=81=D0=BA=D1=80=D1=8B=D1=82=D0=BE=D0=B9=20?= =?UTF-8?q?=D0=BE=D1=82=D0=BF=D1=80=D0=B0=D0=B2=D0=BA=D0=B8,=20=D0=B4?= =?UTF-8?q?=D0=BE=D0=B1=D0=B0=D0=B2=D0=B8=D0=B2=20=D0=B5=D0=B3=D0=BE=20?= =?UTF-8?q?=D1=84=D1=83=D0=BD=D0=BA=D1=86=D0=B8=D0=BE=D0=BD=D0=B0=D0=BB=20?= =?UTF-8?q?=D0=B2=20=D0=BF=D1=80=D0=BE=D1=81=D1=82=D0=BE=D0=B9=20=D1=8E?= =?UTF-8?q?=D0=BD=D0=B8=D1=82=20=D1=81=D0=BE=D1=85=D1=80=D0=B0=D0=BD=D0=B5?= =?UTF-8?q?=D0=BD=D0=B8=D1=8F=20=D0=A0=D0=B0=D0=B7=D0=BE=D0=B1=D1=80=D0=B0?= =?UTF-8?q?=D0=BB=D1=81=D1=8F=20=D1=81=20=D0=BB=D0=BE=D0=B3=D0=B8=D0=BA?= =?UTF-8?q?=D0=BE=D0=B9=20=D1=8E=D0=BD=D0=B8=D1=82=D0=BE=D0=B2=20=D1=81=20?= =?UTF-8?q?AFTER=20=D1=81=D1=80=D0=B0=D0=B1=D0=B0=D1=82=D1=8B=D0=B2=D0=B0?= =?UTF-8?q?=D0=BD=D0=B8=D0=B5=D0=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/java/org/sadtech/bot/core/domain/BoxAnswer.java | 2 +- .../org/sadtech/bot/core/domain/keyboard/KeyBoardLine.java | 2 +- src/main/java/org/sadtech/bot/core/service/KeyBoards.java | 6 +++--- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/main/java/org/sadtech/bot/core/domain/BoxAnswer.java b/src/main/java/org/sadtech/bot/core/domain/BoxAnswer.java index 3640594..f417e6e 100644 --- a/src/main/java/org/sadtech/bot/core/domain/BoxAnswer.java +++ b/src/main/java/org/sadtech/bot/core/domain/BoxAnswer.java @@ -12,7 +12,7 @@ public class BoxAnswer { private Float aLong; private Integer stickerId; - public BoxAnswer() { + private BoxAnswer() { } diff --git a/src/main/java/org/sadtech/bot/core/domain/keyboard/KeyBoardLine.java b/src/main/java/org/sadtech/bot/core/domain/keyboard/KeyBoardLine.java index 236ccc9..43b0611 100644 --- a/src/main/java/org/sadtech/bot/core/domain/keyboard/KeyBoardLine.java +++ b/src/main/java/org/sadtech/bot/core/domain/keyboard/KeyBoardLine.java @@ -29,7 +29,7 @@ public class KeyBoardLine { } - public Builder setButtonKeyBoard(KeyBoardButton keyBoardButton) { + public Builder buttonKeyBoard(KeyBoardButton keyBoardButton) { KeyBoardLine.this.keyBoardButtons.add(keyBoardButton); return this; } diff --git a/src/main/java/org/sadtech/bot/core/service/KeyBoards.java b/src/main/java/org/sadtech/bot/core/service/KeyBoards.java index a9b54d7..4c04ed7 100644 --- a/src/main/java/org/sadtech/bot/core/service/KeyBoards.java +++ b/src/main/java/org/sadtech/bot/core/service/KeyBoards.java @@ -16,7 +16,7 @@ public class KeyBoards { public static KeyBoard keyBoardYesNo() { KeyBoardButton yesButton = KeyBoardButton.builder().color(ButtonColor.POSITIVE).label("Да").payload("{\"button\": \"yes\"}").build(); KeyBoardButton noButton = KeyBoardButton.builder().color(ButtonColor.NEGATIVE).label("Нет").payload("{\"button\": \"no\"}").build(); - KeyBoardLine keyBoardLine = KeyBoardLine.builder().setButtonKeyBoard(yesButton).setButtonKeyBoard(noButton).build(); + KeyBoardLine keyBoardLine = KeyBoardLine.builder().buttonKeyBoard(yesButton).buttonKeyBoard(noButton).build(); return KeyBoard.builder().lineKeyBoard(keyBoardLine).oneTime(true).build(); } @@ -24,7 +24,7 @@ public class KeyBoards { KeyBoard.Builder keyBoard = KeyBoard.builder().oneTime(true); for (String labelButton : labelButtons) { KeyBoardButton keyBoardButton = KeyBoardButton.builder().label(labelButton).payload("{\"button\": \"" + labelButton + "\"}").build(); - keyBoard.lineKeyBoard(KeyBoardLine.builder().setButtonKeyBoard(keyBoardButton).build()); + keyBoard.lineKeyBoard(KeyBoardLine.builder().buttonKeyBoard(keyBoardButton).build()); } return keyBoard.build(); } @@ -32,7 +32,7 @@ public class KeyBoards { public static KeyBoard verticalMenuButton(List keyBoardButtons) { KeyBoard.Builder keyBoard = KeyBoard.builder().oneTime(true); for (KeyBoardButton keyBoardButton : keyBoardButtons) { - keyBoard.lineKeyBoard(KeyBoardLine.builder().setButtonKeyBoard(keyBoardButton).build()); + keyBoard.lineKeyBoard(KeyBoardLine.builder().buttonKeyBoard(keyBoardButton).build()); } return keyBoard.build(); }