/** * */ package net.pacien.util; import java.util.Collection; import java.util.HashMap; import java.util.Map; /** * @author pacien * */ public class IntrinsicMap extends HashMap { /** * */ private static final long serialVersionUID = 1L; /** * */ public IntrinsicMap() { super(); } /** * @param initialCapacity */ public IntrinsicMap(final int initialCapacity) { super(initialCapacity); } /** * @param m */ public IntrinsicMap(final Map m) { super(m); } /** * @param initialCapacity * @param loadFactor */ public IntrinsicMap(final int initialCapacity, final float loadFactor) { super(initialCapacity, loadFactor); } @SuppressWarnings("unchecked") public V put(final V value) { return super.put((K) value.getKey(), value); } @Override public V put(final K key, final V value) { return this.put(value); } public void putAll(final Collection collection) { for (final V value : collection) { this.put(value); } } }