public static <T, L, R, LC extends Collection<L>, RC extends Collection<R>, E extends Exception> Pair<LC, RC> unzip(final Collection<? extends T> c,
            final Try.BiConsumer<? super T, Pair<L, R>, E> unzip, final IntFunction<? extends Collection<?>> supplier) throws E {
        final int len = size(c);

        final LC l = (LC) supplier.apply(len);
        final RC r = (RC) supplier.apply(len);
        final Pair<L, R> p = new Pair<>();

        if (notNullOrEmpty(c)) {
            for (T e : c) {
                unzip.accept(e, p);

                l.add(p.left);
                r.add(p.right);
            }
        }

        return Pair.of(l, r);
    }
public static < T , L , R , LC extends Collection < L > , RC extends Collection < R > , E extends Exception > Pair < LC , RC > unzip ( final Collection < ? extends T > c , final Try . BiConsumer < ? super T , Pair < L , R > , E > unzip , final IntFunction < ? extends Collection < ? > > supplier ) throws E { final int len = size ( c ) ; final LC l = ( LC ) supplier . apply ( len ) ; final RC r = ( RC ) supplier . apply ( len ) ; final Pair < L , R > p = new Pair < > ( ) ; if ( notNullOrEmpty ( c ) ) { for ( T e : c ) { unzip . accept ( e , p ) ; l . add ( p . left ) ; r . add ( p . right ) ; } } return Pair . of ( l , r ) ; }
@param c
@param unzip the second parameter is an output parameter.
@param supplier
@return