org.telegram.telegrambots.abilitybots.api.objects.ReplyCollection Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of telegrambots-abilities Show documentation
Show all versions of telegrambots-abilities Show documentation
AbilityBot Extension and Abstraction
package org.telegram.telegrambots.abilitybots.api.objects;
import java.util.Collection;
import java.util.stream.Stream;
import static com.google.common.collect.Lists.newArrayList;
/**
* A wrapping object containing Replies. Return this in your bot class to get replies registered.
*
* @see Reply
*/
public class ReplyCollection {
public final Collection replies;
public ReplyCollection(Collection replies) {
this.replies = replies;
}
public Collection getReplies() {
return replies;
}
public Stream stream(){
return replies.stream();
}
public static ReplyCollection of(Reply... replies){
return new ReplyCollection(newArrayList(replies));
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy