elk-util-parent/elk-util-collections/src/main/java/org/semanticweb/elk/util/collections/ArraySlicedSet.java
private void shrink() {
		int oldCapacity = data.length;
		if (oldCapacity == 1)
			return;
		E[] oldData = data;
		int[] oldMasks = masks;
		int newCapacity = oldCapacity >> 1;
		@SuppressWarnings("unchecked")
		E[] newData = (E[]) new Object[newCapacity];
		int[] newMasks = new int[getMaskCapacity(logs, newCapacity)];
		for (int i = 0; i < oldCapacity; i++) {
			E e = oldData[i];
			if (e != null)
				addMask(logs, newData, newMasks, e,
						getFragment(logs, oldMasks, i));
		}
		this.data = newData;
		this.masks = newMasks;
	}
private void shrink() {
		int oldCapacity = data.length;
		if (oldCapacity == 1)
			return;
		E[] oldData = data;
		int[] oldMasks = masks;
		int newCapacity = oldCapacity >> 1;
		@SuppressWarnings("unchecked")
		E[] newData = (E[]) new Object[newCapacity];
		int[] newMasks = new int[getMaskCapacity(logs, newCapacity)];
		for (int i = 0; i < oldCapacity; i++) {
			E e = oldData[i];
			if (e != null)
				addMask(logs, newData, newMasks, e,
						getFragment(logs, oldMasks, i));
		}
		this.data = newData;
		this.masks = newMasks;
	}
private void shrink ( ) { int oldCapacity = data . length ; if ( oldCapacity == 1 ) return ; E [ ] oldData = data ; int [ ] oldMasks = masks ; int newCapacity = oldCapacity >> 1 ; @ SuppressWarnings ( "unchecked" ) E [ ] newData = ( E [ ] ) new Object [ newCapacity ] ; int [ ] newMasks = new int [ getMaskCapacity ( logs , newCapacity ) ] ; for ( int i = 0 ; i < oldCapacity ; i ++ ) { E e = oldData [ i ] ; if ( e != null ) addMask ( logs , newData , newMasks , e , getFragment ( logs , oldMasks , i ) ) ; } this . data = newData ; this . masks = newMasks ; }
Decreasing the capacity of the table
Decreasing the capacity of the table