public final void remove() {
      if (lastReturned == null) {
        throw new IllegalStateException();
      }
      removeInternal(lastReturned, true);
      lastReturned = null;
      expectedModCount = modCount;
    }
This stack is a singly linked list, linked by the 'parent' field.
lottie/src/main/java/com/airbnb/lottie/parser/moshi/LinkedHashTreeMap.java