Class Torrent.Builder

  • Enclosing class:
    Torrent

    public static final class Torrent.Builder
    extends Object
    A builder to create new instances of Torrent
    • Constructor Detail

      • Builder

        public Builder()
    • Method Detail

      • setTorrentClient

        public Torrent.Builder setTorrentClient​(TorrentClient torrentClient)
        Sets the torrent client on which this torrent will be registered.
        Parameters:
        torrentClient - The client.
        Returns:
        The adjusted builder.
      • setName

        public Torrent.Builder setName​(String name)
        Sets the display name for this torrent.
        Parameters:
        name - The name to set.
        Returns:
        The adjusted builder.
      • canDownload

        public boolean canDownload()
        Returns:
        true if the hash of the metadata is available.
      • build

        public Torrent build()
        Creates a torrent without metadata information (the .torrent file is not present).
        Returns:
        The newly created torrent.