elk-util-parent/elk-util-collections/src/main/java/org/semanticweb/elk/util/collections/ArrayHashMap.java
private void shrink() {
		int oldCapacity = keys.length;
		if (oldCapacity <= LinearProbing.DEFAULT_INITIAL_CAPACITY)
			return;
		K oldKeys[] = keys;
		V oldValues[] = values;
		int newCapacity = oldCapacity >> 1;
		@SuppressWarnings("unchecked")
		K newKeys[] = (K[]) new Object[newCapacity];
		@SuppressWarnings("unchecked")
		V newValues[] = (V[]) new Object[newCapacity];
		for (int i = 0; i < oldCapacity; i++) {
			K key = oldKeys[i];
			if (key != null)
				putKeyValue(newKeys, newValues, key, oldValues[i]);
		}
		this.keys = newKeys;
		this.values = newValues;
	}
private void shrink() {
		int oldCapacity = keys.length;
		if (oldCapacity <= LinearProbing.DEFAULT_INITIAL_CAPACITY)
			return;
		K oldKeys[] = keys;
		V oldValues[] = values;
		int newCapacity = oldCapacity >> 1;
		@SuppressWarnings("unchecked")
		K newKeys[] = (K[]) new Object[newCapacity];
		@SuppressWarnings("unchecked")
		V newValues[] = (V[]) new Object[newCapacity];
		for (int i = 0; i < oldCapacity; i++) {
			K key = oldKeys[i];
			if (key != null)
				putKeyValue(newKeys, newValues, key, oldValues[i]);
		}
		this.keys = newKeys;
		this.values = newValues;
	}
private void shrink ( ) { int oldCapacity = keys . length ; if ( oldCapacity <= LinearProbing . DEFAULT_INITIAL_CAPACITY ) return ; K oldKeys [ ] = keys ; V oldValues [ ] = values ; int newCapacity = oldCapacity >> 1 ; @ SuppressWarnings ( "unchecked" ) K newKeys [ ] = ( K [ ] ) new Object [ newCapacity ] ; @ SuppressWarnings ( "unchecked" ) V newValues [ ] = ( V [ ] ) new Object [ newCapacity ] ; for ( int i = 0 ; i < oldCapacity ; i ++ ) { K key = oldKeys [ i ] ; if ( key != null ) putKeyValue ( newKeys , newValues , key , oldValues [ i ] ) ; } this . keys = newKeys ; this . values = newValues ; }
Decreasing the capacity of the map
Decreasing the capacity of the map