@Override
    public final boolean remove(Object key) {
        int slot = findElementToRemove(key);
        if (slot == INVALID_INDEX) {
            return false;
        }
        removeElementAtSlot(slot);
        return true;
    }
Remove the first element e such that key.elementKeysAreEqual(e)
and key.hashCode == e.hashCode.

@param key       The object to try to match.
@return          True if an element was removed; false otherwise.
clients/src/main/java/org/apache/kafka/common/utils/ImplicitLinkedHashCollection.java