default @NotNull Iterator<Component> iterator(final @NotNull ComponentIteratorType type, final @NotNull ComponentIteratorFlag@Nullable... flags) {
    return this.iterator(type, flags == null ? Collections.emptySet() : MonkeyBars.enumSet(ComponentIteratorFlag.class, flags));
  }
Returns an iterator for this component.

<p>As components are immutable, this iterator does not support removal.</p>

@param type the type
@param flags the flags
@return the iterator
@since 4.9.0
api/src/main/java/net/kyori/adventure/text/Component.java