Add accessor for torrent files.
authorDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Mon, 18 Feb 2013 20:57:29 +0000 (21:57 +0100)
committerDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Mon, 18 Feb 2013 21:38:39 +0000 (22:38 +0100)
src/main/java/net/pterodactylus/rhynodge/states/TorrentState.java

index ddcd518..22da77f 100644 (file)
@@ -18,6 +18,8 @@
 package net.pterodactylus.rhynodge.states;
 
 import java.nio.charset.Charset;
 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;
 
 import java.util.Iterator;
 import java.util.List;
 
@@ -47,6 +49,15 @@ public class TorrentState extends AbstractState implements Iterable<TorrentFile>
        //
 
        /**
        //
 
        /**
+        * Returns all torrent files of this state.
+        *
+        * @return All torrent files of this state
+        */
+       public Collection<TorrentFile> torrentFiles() {
+               return Collections.unmodifiableList(files);
+       }
+
+       /**
         * Adds a torrent file to this state.
         *
         * @param torrentFile
         * Adds a torrent file to this state.
         *
         * @param torrentFile