docs: @SuppressWarnings("unchecked")
  	public int expurge() {
  		// clear out ref queue.
  		while (this.queue.poll() != null) {
  			this.enquedElement = true;
  		}
  
  		int j;
  
  		if (this.enquedElement) {
  			// Clear the table
  			Reference<? extends T> ref;
  			j = 0;
  			for (int i = 0; i < this.size; ++i) {
  				ref = (Reference<T>) this.data[i];
  				if ((ref == null) || (ref.isEnqueued()) || (ref.get() == null)) {
  					if (ref != null) {
  						ref.clear();
  					}
  					this.data[i] = null;
  				} else {
  					if (i != j) {
  						this.data[j] = this.data[i];
  						this.data[i] = null;
  					}
  					j++;
  				}
  			}
  			this.enquedElement = false;
  		} else {
  			j = this.size;
  		}
  
  		// Allocation of array may have caused GC, which may have caused
  		// additional entries to go stale.  Removing these entries from the
  		// reference queue will make them eligible for reclamation.
  		while (this.queue.poll() != null) {
  			this.enquedElement = true;
  		}
  
  		final int oldSize = this.size;
  		this.size = j;
  
  		if (j < oldSize) {
  			fireReferenceRelease(oldSize - j);
  		}
  
  		return this.size;
  	}