From 8aae8d5403f10f3b46162a8520076eed5749ad78 Mon Sep 17 00:00:00 2001 From: Struchkov Mark Date: Sun, 19 Mar 2023 21:52:42 +0300 Subject: [PATCH] =?UTF-8?q?=D0=A3=D0=BF=D1=80=D0=BE=D1=81=D1=82=D0=B8?= =?UTF-8?q?=D0=BB=20=D0=BA=D0=BB=D0=B0=D0=B2=D0=B8=D0=B0=D1=82=D1=83=D1=80?= =?UTF-8?q?=D1=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/domain/keyboard/button/SimpleButton.java | 14 ++++++-------- .../domain/keyboard/simple/SimpleKeyBoardLine.java | 14 +++++++++----- 2 files changed, 15 insertions(+), 13 deletions(-) diff --git a/bot-domain/bot-domain-main/src/main/java/dev/struchkov/godfather/main/domain/keyboard/button/SimpleButton.java b/bot-domain/bot-domain-main/src/main/java/dev/struchkov/godfather/main/domain/keyboard/button/SimpleButton.java index 5f55110..2c25d16 100644 --- a/bot-domain/bot-domain-main/src/main/java/dev/struchkov/godfather/main/domain/keyboard/button/SimpleButton.java +++ b/bot-domain/bot-domain-main/src/main/java/dev/struchkov/godfather/main/domain/keyboard/button/SimpleButton.java @@ -1,6 +1,9 @@ package dev.struchkov.godfather.main.domain.keyboard.button; import dev.struchkov.godfather.main.domain.keyboard.KeyBoardButton; +import lombok.Getter; +import lombok.NoArgsConstructor; +import lombok.Setter; import java.util.Objects; @@ -12,6 +15,9 @@ import static dev.struchkov.haiti.utils.Inspector.isNotNull; * * @author upagge [08/07/2019] */ +@Getter +@Setter +@NoArgsConstructor public class SimpleButton implements KeyBoardButton { public static final String TYPE = "SIMPLE"; @@ -40,14 +46,6 @@ public class SimpleButton implements KeyBoardButton { return new SimpleButton(label, null); } - public String getLabel() { - return label; - } - - public String getCallbackData() { - return callbackData; - } - @Override public boolean equals(Object o) { if (this == o) return true; diff --git a/bot-domain/bot-domain-main/src/main/java/dev/struchkov/godfather/main/domain/keyboard/simple/SimpleKeyBoardLine.java b/bot-domain/bot-domain-main/src/main/java/dev/struchkov/godfather/main/domain/keyboard/simple/SimpleKeyBoardLine.java index 4894287..89f8773 100644 --- a/bot-domain/bot-domain-main/src/main/java/dev/struchkov/godfather/main/domain/keyboard/simple/SimpleKeyBoardLine.java +++ b/bot-domain/bot-domain-main/src/main/java/dev/struchkov/godfather/main/domain/keyboard/simple/SimpleKeyBoardLine.java @@ -2,6 +2,9 @@ package dev.struchkov.godfather.main.domain.keyboard.simple; import dev.struchkov.godfather.main.domain.keyboard.KeyBoardButton; import dev.struchkov.godfather.main.domain.keyboard.KeyBoardLine; +import lombok.Getter; +import lombok.NoArgsConstructor; +import lombok.Setter; import java.util.ArrayList; import java.util.Arrays; @@ -12,6 +15,9 @@ import java.util.List; * * @author upagge [08/07/2019] */ +@Getter +@Setter +@NoArgsConstructor public class SimpleKeyBoardLine implements KeyBoardLine { /** @@ -35,12 +41,8 @@ public class SimpleKeyBoardLine implements KeyBoardLine { return new Builder(); } - @Override - public List getButtons() { - return buttons; - } - public static final class Builder { + private List buttons = new ArrayList<>(); private Builder() { @@ -59,5 +61,7 @@ public class SimpleKeyBoardLine implements KeyBoardLine { public SimpleKeyBoardLine build() { return new SimpleKeyBoardLine(this); } + } + }