public static <T, E extends Exception> void flattOp(final T[][] a, Try.Consumer<T[], E> op) throws E {
        if (N.isNullOrEmpty(a)) {
            return;
        }

        final T[] tmp = flattenn(a);

        op.accept(tmp);

        int idx = 0;

        for (T[] e : a) {
            if (N.notNullOrEmpty(e)) {
                N.copy(tmp, idx, e, 0, e.length);
                idx += e.length;
            }
        }
    }
public static < T , E extends Exception > void flattOp ( final T [ ] [ ] a , Try . Consumer < T [ ] , E > op ) throws E { if ( N . isNullOrEmpty ( a ) ) { return ; } final T [ ] tmp = flattenn ( a ) ; op . accept ( tmp ) ; int idx = 0 ; for ( T [ ] e : a ) { if ( N . notNullOrEmpty ( e ) ) { N . copy ( tmp , idx , e , 0 , e . length ) ; idx += e . length ; } } }
flatten -> execute {@code op} -> set values back.
<pre>
<code>
f.flattOp(a, t -> N.sort(t));
</code>
</pre>

@param a
@param op
@throws E