private boolean addObjectToSet(Object[] set, int index, Object newObject) {
    boolean added = true;
    if (index < 0) {
      throw new ArrayIndexOutOfBoundsException(
          "Cannot add:" + newObject + " into array position:" + index);
    }
    Object oldObject = set[index];
    if (oldObject == null || oldObject == REMOVED) {
      set[index] = newObject;
    }

    return added;
  }
@param set represents the array that all elements are stored in
@param index the array index location to store the object. This should be calculated by one of
       the insertionIndex methods
@param newObject the object to add to the set
@return true if object was added
geode-core/src/main/java/org/apache/geode/cache/query/internal/index/HashIndexSet.java