From: David ‘Bombe’ Roden Date: Mon, 18 Feb 2013 20:57:29 +0000 (+0100) Subject: Add accessor for torrent files. X-Git-Tag: 0.1~26 X-Git-Url: https://git.pterodactylus.net/?a=commitdiff_plain;h=dc182c1007455256e7a064ff9b0bedfd9a7a7a74;p=rhynodge.git Add accessor for torrent files. --- diff --git a/src/main/java/net/pterodactylus/rhynodge/states/TorrentState.java b/src/main/java/net/pterodactylus/rhynodge/states/TorrentState.java index ddcd518..22da77f 100644 --- a/src/main/java/net/pterodactylus/rhynodge/states/TorrentState.java +++ b/src/main/java/net/pterodactylus/rhynodge/states/TorrentState.java @@ -18,6 +18,8 @@ package net.pterodactylus.rhynodge.states; import java.nio.charset.Charset; +import java.util.Collection; +import java.util.Collections; import java.util.Iterator; import java.util.List; @@ -47,6 +49,15 @@ public class TorrentState extends AbstractState implements Iterable // /** + * Returns all torrent files of this state. + * + * @return All torrent files of this state + */ + public Collection torrentFiles() { + return Collections.unmodifiableList(files); + } + + /** * Adds a torrent file to this state. * * @param torrentFile