X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=src%2Fmain%2Fjava%2Fnet%2Fpterodactylus%2Fxdcc%2Fdata%2FDownload.java;h=926adad3e598488af164b331517963005df80fd0;hb=9d685ddca572f2300b8e463c420de6c4d5fa6eae;hp=0592eaf9477c925f2e42e9dc1cc31881a75207bc;hpb=db7e9612fa189cee9f4b9086e00d87c4d6c58bbf;p=xudocci.git diff --git a/src/main/java/net/pterodactylus/xdcc/data/Download.java b/src/main/java/net/pterodactylus/xdcc/data/Download.java index 0592eaf..926adad 100644 --- a/src/main/java/net/pterodactylus/xdcc/data/Download.java +++ b/src/main/java/net/pterodactylus/xdcc/data/Download.java @@ -24,6 +24,8 @@ import java.net.InetAddress; import net.pterodactylus.irc.DccReceiver; +import com.google.common.base.Predicate; + /** * Information about an ongoing download. * @@ -31,6 +33,15 @@ import net.pterodactylus.irc.DccReceiver; */ public class Download { + /** Predicate that identifies downloads that have started. */ + public static final Predicate FILTER_RUNNING = new Predicate() { + + @Override + public boolean apply(Download download) { + return download.dccReceiver() != null; + } + }; + /** The bot that is being downloaded from. */ private final Bot bot;