ASF Bugzilla – Attachment 33001 Details for
Bug 58245
[PATCH] Make Workbook interface iterable over sheets
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
patch to make Workbook interface implement Iterable<Sheet>
WorkbookIterator.patch (text/plain), 1.32 KB, created by
Javen O'Neal
on 2015-08-15 07:15:19 UTC
(
hide
)
Description:
patch to make Workbook interface implement Iterable<Sheet>
Filename:
MIME Type:
Creator:
Javen O'Neal
Created:
2015-08-15 07:15:19 UTC
Size:
1.32 KB
patch
obsolete
>Index: src/java/org/apache/poi/ss/usermodel/Workbook.java >=================================================================== >--- src/java/org/apache/poi/ss/usermodel/Workbook.java (revision 1696016) >+++ src/java/org/apache/poi/ss/usermodel/Workbook.java (working copy) >@@ -20,10 +20,12 @@ > import java.io.Closeable; > import java.io.IOException; > import java.io.OutputStream; >+import java.util.Iterator; > import java.util.List; > > import org.apache.poi.ss.formula.udf.UDFFinder; > import org.apache.poi.ss.usermodel.Row.MissingCellPolicy; >+import org.apache.poi.ss.usermodel.Sheet; > import org.apache.poi.ss.util.CellRangeAddress; > > /** >@@ -31,7 +33,7 @@ > * will construct whether they are reading or writing a workbook. It is also the > * top level object for creating new sheets/etc. > */ >-public interface Workbook extends Closeable { >+public interface Workbook extends Closeable, Iterable<Sheet> { > > /** Extended windows meta file */ > public static final int PICTURE_TYPE_EMF = 2; >@@ -360,6 +362,16 @@ > void close() throws IOException; > > /** >+ * Allows foreach loops: >+ * <pre><code> >+ * for(Sheet sheet : wb ) { >+ * >+ * } >+ * </code></pre> >+ */ >+ Iterator<Sheet> iterator(); >+ >+ /** > * @return the total number of defined names in this workbook > */ > int getNumberOfNames();
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 58245
:
33001
|
33066
|
33067
|
33068