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