Поправил проблему с BoxAnswer
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
9a105cfc92
commit
12d224a218
@ -55,11 +55,7 @@ public class AnswerText<M extends Message> extends MainUnit<M> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public static <M extends Message> AnswerText<M> of(String message) {
|
public static <M extends Message> AnswerText<M> of(String message) {
|
||||||
return AnswerText.<M>builder().answer(BoxAnswer.boxAnswer(message)).build();
|
return AnswerText.<M>builder().answer(() -> BoxAnswer.boxAnswer(message)).build();
|
||||||
}
|
|
||||||
|
|
||||||
public static <M extends Message> AnswerText<M> of(BoxAnswer boxAnswer) {
|
|
||||||
return AnswerText.<M>builder().answer(boxAnswer).build();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public static <M extends Message> Builder<M> builder() {
|
public static <M extends Message> Builder<M> builder() {
|
||||||
@ -120,11 +116,6 @@ public class AnswerText<M extends Message> extends MainUnit<M> {
|
|||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Builder<M> answer(BoxAnswer answer) {
|
|
||||||
this.boxAnswer = message -> Optional.ofNullable(answer);
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Builder<M> answer(Supplier<BoxAnswer> answer) {
|
public Builder<M> answer(Supplier<BoxAnswer> answer) {
|
||||||
this.boxAnswer = message -> Optional.ofNullable(answer.get());
|
this.boxAnswer = message -> Optional.ofNullable(answer.get());
|
||||||
return this;
|
return this;
|
||||||
|
Loading…
Reference in New Issue
Block a user