public InlineKeyboardMarkup toKeyboard ( ) { InlineKeyboardMarkup . InlineKeyboardMarkupBuilder builder = InlineKeyboardMarkup . builder ( ) ; if ( rows . isEmpty ( ) ) { return null ; } rows . stream ( ) . map ( InlineMenuRow :: toButtons ) . forEach ( builder :: addRow ) ; return builder . build ( ) ; }
Converts rows to the inline keyboard markup used by the Telegram API