From 12d224a218ba9bff8d6b6eeb43e0650674663a50 Mon Sep 17 00:00:00 2001 From: Struchkov Mark Date: Wed, 22 Mar 2023 14:17:52 +0300 Subject: [PATCH] =?UTF-8?q?=D0=9F=D0=BE=D0=BF=D1=80=D0=B0=D0=B2=D0=B8?= =?UTF-8?q?=D0=BB=20=D0=BF=D1=80=D0=BE=D0=B1=D0=BB=D0=B5=D0=BC=D1=83=20?= =?UTF-8?q?=D1=81=20BoxAnswer?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../godfather/simple/domain/unit/AnswerText.java | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/bot-domain/bot-domain-simple/src/main/java/dev/struchkov/godfather/simple/domain/unit/AnswerText.java b/bot-domain/bot-domain-simple/src/main/java/dev/struchkov/godfather/simple/domain/unit/AnswerText.java index 4d8c46d..62008f4 100644 --- a/bot-domain/bot-domain-simple/src/main/java/dev/struchkov/godfather/simple/domain/unit/AnswerText.java +++ b/bot-domain/bot-domain-simple/src/main/java/dev/struchkov/godfather/simple/domain/unit/AnswerText.java @@ -55,11 +55,7 @@ public class AnswerText extends MainUnit { } public static AnswerText of(String message) { - return AnswerText.builder().answer(BoxAnswer.boxAnswer(message)).build(); - } - - public static AnswerText of(BoxAnswer boxAnswer) { - return AnswerText.builder().answer(boxAnswer).build(); + return AnswerText.builder().answer(() -> BoxAnswer.boxAnswer(message)).build(); } public static Builder builder() { @@ -120,11 +116,6 @@ public class AnswerText extends MainUnit { return this; } - public Builder answer(BoxAnswer answer) { - this.boxAnswer = message -> Optional.ofNullable(answer); - return this; - } - public Builder answer(Supplier answer) { this.boxAnswer = message -> Optional.ofNullable(answer.get()); return this;