code: public int addLast(KTypeContainer<? extends KType> container) {
      int size = container.size();
      ensureBufferSpace(size);
  
      for (KTypeCursor<? extends KType> cursor : container) {
        addLast(cursor.value);
      }
  
      return size;
    }
docs: Inserts all elements from the given container to the end of this deque.
  
  @param container The container to iterate over.
  
  @return Returns the number of elements actually added as a result of this
  call.