default @NotNull Iterator<Component> iterator(final @NotNull ComponentIteratorType type, final @NotNull Set<ComponentIteratorFlag> flags) {
    return new ComponentIterator(this, requireNonNull(type, "type"), requireNonNull(flags, "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