Interface MessageIdsCallbackDataMapper
public interface MessageIdsCallbackDataMapper
Mapper interface for converting between
MessageIdsCommandCallbackDataDTO
and
MessageIdsTelegramCommandCallbackDataDTO
.
This interface uses MapStruct to generate the implementation at compile time.-
Method Summary
Modifier and TypeMethodDescriptiondefault int
getSize
(Collection<?> collection) Gets the size of a collection.map
(MessageIdsCommandCallbackDataDTO callbackData) Maps aMessageIdsCommandCallbackDataDTO
to aMessageIdsTelegramCommandCallbackDataDTO
.map
(MessageIdsTelegramCommandCallbackDataDTO callbackData) Maps aMessageIdsTelegramCommandCallbackDataDTO
to aMessageIdsCommandCallbackDataDTO
.mapMessageIds
(MessageIdsTelegramCommandCallbackDataDTO callbackData) Maps the message IDs from aMessageIdsTelegramCommandCallbackDataDTO
to a list of integers.
-
Method Details
-
map
Maps aMessageIdsCommandCallbackDataDTO
to aMessageIdsTelegramCommandCallbackDataDTO
.- Parameters:
callbackData
- the source callback data- Returns:
- the mapped Telegram command callback data
-
map
Maps aMessageIdsTelegramCommandCallbackDataDTO
to aMessageIdsCommandCallbackDataDTO
.- Parameters:
callbackData
- the source Telegram command callback data- Returns:
- the mapped command callback data
-
getSize
Gets the size of a collection.- Parameters:
collection
- the collection to get the size of- Returns:
- the size of the collection
-
mapMessageIds
Maps the message IDs from aMessageIdsTelegramCommandCallbackDataDTO
to a list of integers. This method generates a list of integers starting from the first message ID and continuing for the specified number of messages.- Parameters:
callbackData
- the source Telegram command callback data containing the first message ID and count- Returns:
- a list of message IDs
-