From e78a2da6c0b46d5edd89b95cbc2114b1303e4db7 Mon Sep 17 00:00:00 2001 From: Redkale <8730487+redkale@users.noreply.github.com> Date: Wed, 9 Jan 2019 16:16:08 +0800 Subject: [PATCH] --- src/org/redkale/util/Sheet.java | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/org/redkale/util/Sheet.java b/src/org/redkale/util/Sheet.java index cc7845ceb..c0374961e 100644 --- a/src/org/redkale/util/Sheet.java +++ b/src/org/redkale/util/Sheet.java @@ -140,7 +140,11 @@ public class Sheet implements java.io.Serializable, Iterable { return (this.rows == null) ? new ArrayList().toArray() : this.rows.toArray(); } - public T[] toArray(T[] a) { - return (this.rows == null) ? new ArrayList().toArray(a) : this.rows.toArray(a); + public E[] toArray(E[] a) { + return (this.rows == null) ? new ArrayList().toArray(a) : this.rows.toArray(a); + } + + public E[] toArray(IntFunction generator) { + return (this.rows == null) ? new ArrayList().toArray(generator.apply(0)) : this.rows.toArray(generator.apply(0)); } }