@Override
        public E next() {
            if (!hasNext()) {
                throw new NoSuchElementException();
            }
            @SuppressWarnings("unchecked")
            E returnValue = (E) cur;
            lastReturned = cur;
            cur = indexToElement(head, elements, cur.next());
            ++index;
            return returnValue;
        }
A static empty array used to avoid object allocations when the capacity is zero.
clients/src/main/java/org/apache/kafka/common/utils/ImplicitLinkedHashCollection.java