code: @SuppressWarnings("unchecked")
      public <E> E[] toArray(E[] array) {
  	for (int i = 0, j = 0; i < array.length; ++i) {
  	    int index = -1;
  	    if (j < indices.length && (index = indices[j]) == i) {
  		array[i] = (E)(Long.valueOf(values[j]));
  		j++;
  	    }
  	    else
  		array[i] = (E)(Long.valueOf(0));
  	}
  
  	return array;
      }
docs: {@inheritDoc}