@SuppressWarnings("unchecked") @Override public V removeKey(K key) { if (key == null) { throw new UnsupportedOperationException("null not supported as key!"); } int index; if (hasHashArray()) { index = this.findAndRemoveHash(key); } else { index = this.findLinear(key); } if (index != -1) { Object value = getValue(index); remove(index); return (V) value; } return null; }
@SuppressWarnings("unchecked") @Override public V removeKey(K key) { if (key == null) { throw new UnsupportedOperationException("null not supported as key!"); } int index; if (hasHashArray()) { index = this.findAndRemoveHash(key); } else { index = this.findLinear(key); } if (index != -1) { Object value = getValue(index); remove(index); return (V) value; } return null; }