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)); } }