Class ForwardingIterator<T>

java.lang.Object
net.kyori.adventure.util.ForwardingIterator<T>
Type Parameters:
T - the type of the iterable
All Implemented Interfaces:
Iterable<T>

public final class ForwardingIterator<T> extends Object implements Iterable<T>
An iterable that forwards the iterator() and spliterator() calls to some suppliers.
Since:
4.9.0
  • Constructor Details

    • ForwardingIterator

      public ForwardingIterator(@NotNull @NotNull Supplier<Iterator<T>> iterator, @NotNull @NotNull Supplier<Spliterator<T>> spliterator)
      Creates a new forwarding iterable.
      Parameters:
      iterator - the iterator supplier
      spliterator - the spliterator supplier
      Since:
      4.9.0
  • Method Details