@Override public E next() { return resolve( src.next() ); }
@Override public E next() { return resolve( src.next() ); }
@Override @SuppressWarnings("unchecked") public E[] nextChunk() { final S[] a = src.nextChunk(); E[] b = null; for (int i = 0; i < a.length; i++) { final E e = resolve(a[i]); if (b == null) { /* * Dynamically instantiation an array of the same component type * as the objects that we are visiting. */ b = (E[]) java.lang.reflect.Array.newInstance(e.getClass(), a.length); } b[i] = e; } return b; }
@Override @SuppressWarnings("unchecked") public E[] nextChunk() { final S[] a = src.nextChunk(); E[] b = null; for (int i = 0; i < a.length; i++) { final E e = resolve(a[i]); if (b == null) { /* * Dynamically instantiation an array of the same component type * as the objects that we are visiting. */ b = (E[]) java.lang.reflect.Array.newInstance(e.getClass(), a.length); } b[i] = e; } return b; }