public static <C extends Collection<Optional<E>>, E> Iterator<C> unchainLongest(int channelSize, Supplier<C> channelProvider, E... array) {
        final ConstantSupplier<Optional<Integer>> channelsSizesProvider = new ConstantSupplier<Optional<Integer>>(Optional.of(channelSize));
        return new UnchainLongestIterator<C, E>(channelsSizesProvider, new ArrayIterator<E>(array), channelProvider);
    }
public static < C extends Collection < Optional < E > > , E > Iterator < C > unchainLongest ( int channelSize , Supplier < C > channelProvider , E ... array ) { final ConstantSupplier < Optional < Integer > > channelsSizesProvider = new ConstantSupplier < Optional < Integer > > ( Optional . of ( channelSize ) ) ; return new UnchainLongestIterator < C , E > ( channelsSizesProvider , new ArrayIterator < E > ( array ) , channelProvider ) ; }
Demultiplexes elements from the source array into an iterator of channels.
All returned channels will have the specified size, eventually the last channel could have the last elements empty.
<code>
unchainLongest(2, [1,2,3,4,5]) -> [[just 1, just 2],[just 3, just 4],[just 5, nothing]]
</code>

@param <C> the channel collection type
@param <E> the element type
@param channelSize size of the channel
@param channelProvider the supplier used to create channels
@param array the source array
@return an iterator of channels