code: @SuppressWarnings("unchecked")
      public <E> E[] toArray(E[] array) {	
  	for (int i = 0; i < keyIndices.length; ++i) {
  	    int index = keyIndices[i];
  	    if (index < 0)
  		continue;
  	    else if (index >= array.length)
  		break;
  	    array[keyIndices[i]] = (E)(values[i]);
  	}
  	return array;
      }
docs: {@inheritDoc}