Class KeyboardRow
- java.lang.Object
-
- java.util.AbstractCollection<E>
-
- java.util.AbstractList<E>
-
- java.util.ArrayList<KeyboardButton>
-
- org.telegram.telegrambots.meta.api.objects.replykeyboard.buttons.KeyboardRow
-
- All Implemented Interfaces:
Serializable
,Cloneable
,Iterable<KeyboardButton>
,Collection<KeyboardButton>
,List<KeyboardButton>
,RandomAccess
,Validable
public class KeyboardRow extends ArrayList<KeyboardButton> implements Validable
- Version:
- 1.0 Row for ReplyKeyBoardMarkup
- Author:
- Ruben Bermudez
- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class java.util.AbstractList
modCount
-
-
Constructor Summary
Constructors Constructor Description KeyboardRow()
KeyboardRow(int initialCapacity)
KeyboardRow(Collection<? extends KeyboardButton> c)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
add(int index, String text)
boolean
add(String text)
void
addAll(List<String> buttonNames)
boolean
contains(String text)
int
indexOf(String text)
int
lastIndexOf(String text)
boolean
remove(String text)
KeyboardButton
set(int index, String text)
void
validate()
Validates that mandatory fields are filled and optional objects-
Methods inherited from class java.util.ArrayList
add, add, addAll, addAll, clear, clone, contains, ensureCapacity, forEach, get, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, removeIf, removeRange, replaceAll, retainAll, set, size, sort, spliterator, subList, toArray, toArray, trimToSize
-
Methods inherited from class java.util.AbstractList
equals, hashCode
-
Methods inherited from class java.util.AbstractCollection
containsAll, toString
-
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface java.util.Collection
parallelStream, stream
-
Methods inherited from interface java.util.List
containsAll, equals, hashCode
-
-
-
-
Constructor Detail
-
KeyboardRow
public KeyboardRow(int initialCapacity)
-
KeyboardRow
public KeyboardRow()
-
KeyboardRow
public KeyboardRow(Collection<? extends KeyboardButton> c)
-
-
Method Detail
-
add
public boolean add(String text)
-
add
public void add(int index, String text)
-
contains
public boolean contains(String text)
-
lastIndexOf
public int lastIndexOf(String text)
-
indexOf
public int indexOf(String text)
-
set
public KeyboardButton set(int index, String text)
-
remove
public boolean remove(String text)
-
validate
public void validate() throws TelegramApiValidationException
Description copied from interface:Validable
Validates that mandatory fields are filled and optional objects- Specified by:
validate
in interfaceValidable
- Throws:
TelegramApiValidationException
- If any mandatory field is empty
-
-