mirror of https://github.com/apache/poi.git
Add java.lang.Iterable style methods for iterating over rows and cells, but don't actually implement that, as it wasn't in jdk 1.3 or jdk 1.4, with is rather tedious
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@618680 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
abe75c040f
commit
407a62f2bc
|
@ -466,11 +466,17 @@ public class HSSFRow
|
|||
* @return cell iterator of the physically defined cells. Note element 4 may
|
||||
* actually be row cell depending on how many are defined!
|
||||
*/
|
||||
|
||||
public Iterator cellIterator()
|
||||
{
|
||||
return new CellIterator();
|
||||
}
|
||||
/**
|
||||
* Alias for {@link CellIterator} to allow
|
||||
* foreach loops
|
||||
*/
|
||||
public Iterator iterator() {
|
||||
return cellIterator();
|
||||
}
|
||||
|
||||
private class CellIterator implements Iterator
|
||||
{
|
||||
|
|
|
@ -701,11 +701,18 @@ public class HSSFSheet
|
|||
* @return an iterator of the PHYSICAL rows. Meaning the 3rd element may not
|
||||
* be the third row if say for instance the second row is undefined.
|
||||
*/
|
||||
|
||||
public Iterator rowIterator()
|
||||
{
|
||||
return rows.values().iterator();
|
||||
}
|
||||
/**
|
||||
* Alias for {@link #rowIterator()} to allow
|
||||
* foreach loops
|
||||
*/
|
||||
public Iterator iterator() {
|
||||
return rowIterator();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* used internally in the API to get the low level Sheet record represented by this
|
||||
|
|
Loading…
Reference in New Issue