Add addAll method for keyboardrow
This commit is contained in:
parent
ffc1f713dc
commit
4efaa253b8
@ -4,6 +4,7 @@ import org.telegram.telegrambots.meta.api.interfaces.Validable;
|
||||
import org.telegram.telegrambots.meta.exceptions.TelegramApiValidationException;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author Ruben Bermudez
|
||||
@ -20,6 +21,10 @@ public class KeyboardRow extends ArrayList<KeyboardButton> implements Validable
|
||||
super.add(index, new KeyboardButton(text));
|
||||
}
|
||||
|
||||
public void addAll(List<String> buttonNames) {
|
||||
buttonNames.forEach(KeyboardButton::new);
|
||||
}
|
||||
|
||||
public boolean contains(String text) {
|
||||
return super.contains(new KeyboardButton(text));
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user