package com.github.to2mbn.jmccc.mcdownloader;

import java.util.Set;

public class AssetsIndex {

	private Set<Asset> assets;

	/**
	 * Creates an AssetsIndex.
	 * 
	 * @param assets the assets
	 */
	public AssetsIndex(Set<Asset> assets) {
		this.assets = assets;
	}

	/**
	 * Gets the assets.
	 * 
	 * @return the assets
	 */
	public Set<Asset> getAssets() {
		return assets;
	}

}

@@ -61,40 +61,522 @@
 til.
+Hash
 Set;%0A
-%0Apublic class AssetsIndex %7B
+import java.util.Set;%0Aimport org.json.JSONObject;%0A%0Apublic class AssetsIndex %7B%0A%0A%09public static AssetsIndex fromJson(JSONObject json) %7B%0A%09%09JSONObject objects = json.getJSONObject(%22objects%22);%0A%09%09Set%3CAsset%3E assets = new HashSet%3C%3E();%0A%09%09for (String virtualPath : objects.keySet()) %7B%0A%09%09%09JSONObject object = objects.getJSONObject(virtualPath);%0A%09%09%09String hash = object.getString(%22hash%22);%0A%09%09%09int size = object.getInt(%22size%22);%0A%09%09%09assets.add(new Asset(virtualPath, hash, size));%0A%09%09%7D%0A%09%09return new AssetsIndex(assets);%0A%09%7D
 %0A%0A%09p

add AssetsIndex.fromJson