package pirateboat.torrent;

public enum TorrentType {
    MOVIES("Movies"),
    SERIES_SHOWS("Series-Shows"),
    TRANSFER("transfer");

    public String getType() {
        return type;
    }

    private final String type;

    private TorrentType(String type) {
        this.type = type;
    }

    public static TorrentType valueOfType(String type) {
        for (TorrentType torrentType : values()) {
            if (torrentType.type.equals(type)) {
                return torrentType;
            }
        }
        return null;
    }
}

@@ -297,250 +297,6 @@
  %7D%0A%0A
-    public static TorrentType valueOfType(String type) %7B%0A        for (TorrentType torrentType : values()) %7B%0A            if (torrentType.type.equals(type)) %7B%0A                return torrentType;%0A            %7D%0A        %7D%0A        return null;%0A    %7D%0A
 %7D%0A

remove unused Code