@@ -0,0 +1,987 @@
+package utils.collections;%0A%0Aimport java.util.Arrays;%0Aimport java.util.HashMap;%0Aimport utils.tuples.Pair;%0A%0A/**%0A * %0A * See %7B@link #getCasted(Object)%7D%0A * %0A * @author Jenna%0A *%0A */%0Apublic class GenericMap extends HashMap%3CObject, Object%3E%0A%7B%0A%09/**%0A%09 * Constructs a map containing the specified elements.%0A%09 *%0A%09 * @param objs the objects to be placed into this map%0A%09 * @throws NullPointerException if %3Ci%3Eobjs%3C/i%3E is null%0A%09 */%0A%09public GenericMap(Pair%3C?,?%3E... entries)%7B%0A%09%09Arrays.stream(entries)%0A%09%09%09%09.forEach(entry -%3E this.put(entry.getFirst(), entry.getFirst()));%0A%09%7D%0A%09%0A%09/**%0A%09 * Returns the element at the specified position in this map, casted to its%0A%09 * original type.%0A%09 *%0A%09 * @param key index of the element to return%0A%09 * @return the element at the specified position in this map%0A%09 * @throws IndexOutOfBoundsException %7B@inheritDoc%7D%0A%09 */%0A%09@SuppressWarnings(%22unchecked%22)%0A%09public %3CT,K%3E T getCasted(K key)%7B%0A%09%09Object obj = super.get(key);%0A%09%09return obj == null ? null : (T)obj.getClass().cast(obj);%0A%09%7D%0A%7D%0A

Create GenericMap.java