X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=src%2Fmain%2Fjava%2Fnet%2Fpterodactylus%2Fxdcc%2Fcore%2FCore.java;h=b1578511f005f8284b54e6ef46faca9d27197d02;hb=0965ebe566ffbd6ee89390dd08bb8ae61654aae7;hp=fb3e61efb2b83e6257b937a1da2a18bac2f74fa3;hpb=58dbc9b92a90eb17fecaf12d9ef070bce621ebdb;p=xudocci.git diff --git a/src/main/java/net/pterodactylus/xdcc/core/Core.java b/src/main/java/net/pterodactylus/xdcc/core/Core.java index fb3e61e..b157851 100644 --- a/src/main/java/net/pterodactylus/xdcc/core/Core.java +++ b/src/main/java/net/pterodactylus/xdcc/core/Core.java @@ -17,6 +17,7 @@ package net.pterodactylus.xdcc.core; +import static net.pterodactylus.xdcc.data.Channel.TO_NETWORK; import static net.pterodactylus.xdcc.data.Download.FILTER_RUNNING; import java.io.File; @@ -158,6 +159,15 @@ public class Core extends AbstractExecutionThreadService { } /** + * Returns all defined networks. + * + * @return All defined networks + */ + public Collection networks() { + return FluentIterable.from(channels).transform(TO_NETWORK).toSet(); + } + + /** * Returns all configured channels. Due to various circumstances, configured * channels might not actually be joined. *