projects
/
rhynodge.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add accessor for torrent files.
[rhynodge.git]
/
src
/
main
/
java
/
net
/
pterodactylus
/
rhynodge
/
states
/
TorrentState.java
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
(file)
--- 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;
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