code: public int[] getElementIndices() {
          Integer[] indices = indexToValue.keySet().toArray(new Integer[0]);
          int[] primitive = new int[indices.length];
          for (int i = 0; i < indices.length; ++i)
              primitive[i] = indices[i].intValue();
          return primitive;
      }
docs: Returns the indices of the array that contain non-{@code 0} values.
  
  @return the indices that contain values