package net.minecraft.launcher.updater;

import java.util.Iterator;
import java.util.LinkedHashMap;
import java.util.Map;
import java.util.Map.Entry;

public class LibraryDownloadInfo {
   private DownloadInfo artifact;
   private Map<String, DownloadInfo> classifiers;

   public LibraryDownloadInfo() {
   }

   public LibraryDownloadInfo(LibraryDownloadInfo other) {
      this.artifact = other.artifact;
      if (other.classifiers != null) {
         this.classifiers = new LinkedHashMap();
         Iterator var2 = other.classifiers.entrySet().iterator();

         while(var2.hasNext()) {
            Entry<String, DownloadInfo> entry = (Entry)var2.next();
            this.classifiers.put(entry.getKey(), new DownloadInfo((DownloadInfo)entry.getValue()));
         }
      }

   }

   public DownloadInfo getDownloadInfo(String classifier) {
      return classifier == null ? this.artifact : (DownloadInfo)this.classifiers.get(classifier);
   }
}
