All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.telegram.telegrambots.abilitybots.api.objects.ReplyCollection Maven / Gradle / Ivy

There is a newer version: 7.10.0
Show newest version
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