This commit is contained in:
@@ -67,7 +67,7 @@ public class Sheet<T> implements java.io.Serializable, Iterable<T> {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
return "Sheet[total=" + this.total + ", rows=" + this.rows + "]";
|
return "{\"total\":" + this.total + ", \"rows\":" + this.rows + "}";
|
||||||
}
|
}
|
||||||
|
|
||||||
public long getTotal() {
|
public long getTotal() {
|
||||||
@@ -107,6 +107,12 @@ public class Sheet<T> implements java.io.Serializable, Iterable<T> {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void forEachParallel(final Consumer<? super T> consumer) {
|
||||||
|
if (consumer != null && this.rows != null && !this.rows.isEmpty()) {
|
||||||
|
this.rows.parallelStream().forEach(consumer);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Spliterator<T> spliterator() {
|
public Spliterator<T> spliterator() {
|
||||||
return (this.rows == null) ? new ArrayList<T>().spliterator() : this.rows.spliterator();
|
return (this.rows == null) ? new ArrayList<T>().spliterator() : this.rows.spliterator();
|
||||||
|
|||||||
Reference in New Issue
Block a user