private static int calculateCapacity(int expectedNumElements) {
        // Avoid using even-sized capacities, to get better key distribution.
        int newCapacity = (2 * expectedNumElements) + 1;
        // Don't use a capacity that is too small.
        return Math.max(newCapacity, MIN_NONEMPTY_CAPACITY);
    }
Returns true if there is at least one element e in the collection such
that key.elementKeysAreEqual(e) and key.hashCode() == e.hashCode().

@param key       The object to try to match.
clients/src/main/java/org/apache/kafka/common/utils/ImplicitLinkedHashCollection.java