@Override
  public boolean remove(Object o) {
    synchronized (lock) {
      int currentSize = size(); // byte to int
      if (o == null) {
        for (int index = 0; index < currentSize; index++) {
          if (elementData[index] == null) {
            fastRemove(index);
            return true;
          }
        }
      } else {
        for (int index = 0; index < currentSize; index++) {
          if (o.equals(elementData[index])) {
            fastRemove(index);
            return true;
          }
        }
      }
    }
    return false;
  }
Removes the first occurrence of the specified element from this list, if it is present. If the
list does not contain the element, it is unchanged. More formally, removes the element with the
lowest index <tt>i</tt> such that
<tt>(o==null&nbsp;?&nbsp;get(i)==null&nbsp;:&nbsp;o.equals(get(i)))</tt> (if such an element
exists). Returns <tt>true</tt> if this list contained the specified element (or equivalently,
if this list changed as a result of the call).

@param o element to be removed from this list, if present
@return <tt>true</tt> if this list contained the specified element
geode-core/src/main/java/org/apache/geode/cache/query/internal/index/IndexElemArray.java