Упростил клавиатуры
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -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<KeyBoardButton> getButtons() {
|
||||
return buttons;
|
||||
}
|
||||
|
||||
public static final class Builder {
|
||||
|
||||
private List<KeyBoardButton> buttons = new ArrayList<>();
|
||||
|
||||
private Builder() {
|
||||
@@ -59,5 +61,7 @@ public class SimpleKeyBoardLine implements KeyBoardLine {
|
||||
public SimpleKeyBoardLine build() {
|
||||
return new SimpleKeyBoardLine(this);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user