@@ -0,0 +1,1077 @@
+package me.coley.recaf.util;%0A%0Aimport java.util.Collection;%0Aimport java.util.HashMap;%0Aimport java.util.HashSet;%0Aimport java.util.Map;%0Aimport java.util.Set;%0A%0A/**%0A * Misc collection utilities.%0A */%0Apublic class CollectionUtil %7B%0A%09/**%0A%09 * Copies a collection into a set.%0A%09 *%0A%09 * @param original%0A%09 * %09%09Original collection.%0A%09 * @param %3CT%3E%0A%09 * %09%09Type of item in collection.%0A%09 *%0A%09 * @return Copied set.%0A%09 */%0A%09public static %3CT%3E Set%3CT%3E copySet(Collection%3CT%3E original) %7B%0A%09%09return new HashSet%3C%3E(original);%0A%09%7D%0A%0A%09/**%0A%09 * Copies a collection into a list.%0A%09 *%0A%09 * @param original%0A%09 * %09%09Original collection.%0A%09 * @param %3CT%3E%0A%09 * %09%09Type of item in collection.%0A%09 *%0A%09 * @return Copied list%0A%09 */%0A%09public static %3CT%3E Set%3CT%3E copyList(Collection%3CT%3E original) %7B%0A%09%09return new HashSet%3C%3E(original);%0A%09%7D%0A%0A%09/**%0A%09 * Copies a map into another map.%0A%09 *%0A%09 * @param original%0A%09 * %09%09Original collection.%0A%09 * @param %3CK%3E%0A%09 * %09%09Type of key items.%0A%09 * @param %3CV%3E%0A%09 * %09%09Type of value items.%0A%09 *%0A%09 * @return Copied map.%0A%09 */%0A%09public static %3CK, V%3E Map%3CK, V%3E copyMap(Map%3CK, V%3E original) %7B%0A%09%09return new HashMap%3C%3E(original);%0A%09%7D%0A%7D%0A

Add collection utility