Упростил клавиатуры

This commit is contained in:
Struchkov Mark 2023-03-19 21:52:42 +03:00
parent f0d8ea7858
commit 8aae8d5403
Signed by: upagge
GPG Key ID: D3018BE7BA428CA6
2 changed files with 15 additions and 13 deletions

View File

@ -1,6 +1,9 @@
package dev.struchkov.godfather.main.domain.keyboard.button; package dev.struchkov.godfather.main.domain.keyboard.button;
import dev.struchkov.godfather.main.domain.keyboard.KeyBoardButton; import dev.struchkov.godfather.main.domain.keyboard.KeyBoardButton;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
import java.util.Objects; import java.util.Objects;
@ -12,6 +15,9 @@ import static dev.struchkov.haiti.utils.Inspector.isNotNull;
* *
* @author upagge [08/07/2019] * @author upagge [08/07/2019]
*/ */
@Getter
@Setter
@NoArgsConstructor
public class SimpleButton implements KeyBoardButton { public class SimpleButton implements KeyBoardButton {
public static final String TYPE = "SIMPLE"; public static final String TYPE = "SIMPLE";
@ -40,14 +46,6 @@ public class SimpleButton implements KeyBoardButton {
return new SimpleButton(label, null); return new SimpleButton(label, null);
} }
public String getLabel() {
return label;
}
public String getCallbackData() {
return callbackData;
}
@Override @Override
public boolean equals(Object o) { public boolean equals(Object o) {
if (this == o) return true; if (this == o) return true;

View File

@ -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.KeyBoardButton;
import dev.struchkov.godfather.main.domain.keyboard.KeyBoardLine; import dev.struchkov.godfather.main.domain.keyboard.KeyBoardLine;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Arrays; import java.util.Arrays;
@ -12,6 +15,9 @@ import java.util.List;
* *
* @author upagge [08/07/2019] * @author upagge [08/07/2019]
*/ */
@Getter
@Setter
@NoArgsConstructor
public class SimpleKeyBoardLine implements KeyBoardLine { public class SimpleKeyBoardLine implements KeyBoardLine {
/** /**
@ -35,12 +41,8 @@ public class SimpleKeyBoardLine implements KeyBoardLine {
return new Builder(); return new Builder();
} }
@Override
public List<KeyBoardButton> getButtons() {
return buttons;
}
public static final class Builder { public static final class Builder {
private List<KeyBoardButton> buttons = new ArrayList<>(); private List<KeyBoardButton> buttons = new ArrayList<>();
private Builder() { private Builder() {
@ -59,5 +61,7 @@ public class SimpleKeyBoardLine implements KeyBoardLine {
public SimpleKeyBoardLine build() { public SimpleKeyBoardLine build() {
return new SimpleKeyBoardLine(this); return new SimpleKeyBoardLine(this);
} }
} }
} }