X-Git-Url: https://git.pterodactylus.net/?p=rhynodge.git;a=blobdiff_plain;f=src%2Fmain%2Fjava%2Fnet%2Fpterodactylus%2Frhynodge%2Fstates%2FTorrentState.java;h=c0ba68aefddc029e12bbf6ce9835eb835d31716d;hp=22da77f8599d4301c4b73016dec98b12c01051fd;hb=e756bd3f340862312390820f52d080b54ec389af;hpb=dc182c1007455256e7a064ff9b0bedfd9a7a7a74 diff --git a/src/main/java/net/pterodactylus/rhynodge/states/TorrentState.java b/src/main/java/net/pterodactylus/rhynodge/states/TorrentState.java index 22da77f..c0ba68a 100644 --- a/src/main/java/net/pterodactylus/rhynodge/states/TorrentState.java +++ b/src/main/java/net/pterodactylus/rhynodge/states/TorrentState.java @@ -44,6 +44,23 @@ public class TorrentState extends AbstractState implements Iterable @JsonProperty private List files = Lists.newArrayList(); + /** + * Creates a new torrent state without torrent files. + */ + public TorrentState() { + this(Collections. emptySet()); + } + + /** + * Creates a new torrent state containing the given torrent files. + * + * @param torrentFiles + * The torrent files + */ + public TorrentState(Collection torrentFiles) { + files.addAll(torrentFiles); + } + // // ACCESSORS //