Author: nick
Date: Sun Dec 27 18:16:12 2009
New Revision: 894089
URL: http://svn.apache.org/viewvc?rev=894089&view=rev
Log:
Add Generics types to avoid warnings
Modified:
poi/trunk/src/java/org/apache/poi/hssf/model/InternalSheet.java
poi/trunk/src/java/org/apache/poi/hssf/record/aggregates/RowRecordsAggregate.java
Modified: poi/trunk/src/java/org/apache/poi/hssf/model/InternalSheet.java
URL:
http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/hssf/model/InternalSheet.java?rev=894089&r1=894088&r2=894089&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/hssf/model/InternalSheet.java (original)
+++ poi/trunk/src/java/org/apache/poi/hssf/model/InternalSheet.java Sun Dec 27
18:16:12 2009
@@ -129,11 +129,11 @@
/** the DimensionsRecord is always present */
private DimensionsRecord _dimensions;
/** always present */
- protected final RowRecordsAggregate _rowsAggregate;
+ protected final RowRecordsAggregate _rowsAggregate;
private DataValidityTable _dataValidityTable= null;
private ConditionalFormattingTable condFormatting;
- private Iterator rowRecIterator = null;
+ private Iterator<RowRecord> rowRecIterator = null;
/** Add an UncalcedRecord if not true indicating formulas have not been
calculated */
protected boolean _isUncalced = false;
@@ -762,7 +762,7 @@
{
return null;
}
- return ( RowRecord ) rowRecIterator.next();
+ return rowRecIterator.next();
}
/**
Modified:
poi/trunk/src/java/org/apache/poi/hssf/record/aggregates/RowRecordsAggregate.java
URL:
http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/hssf/record/aggregates/RowRecordsAggregate.java?rev=894089&r1=894088&r2=894089&view=diff
==============================================================================
---
poi/trunk/src/java/org/apache/poi/hssf/record/aggregates/RowRecordsAggregate.java
(original)
+++
poi/trunk/src/java/org/apache/poi/hssf/record/aggregates/RowRecordsAggregate.java
Sun Dec 27 18:16:12 2009
@@ -198,11 +198,11 @@
//an iterator and use that instance throughout, rather than
recreating one and
//having to move it to the right position.
int startIndex = block * DBCellRecord.BLOCK_SIZE;
- Iterator rowIter = _rowRecords.values().iterator();
+ Iterator<RowRecord> rowIter = _rowRecords.values().iterator();
RowRecord row = null;
//Position the iterator at the start of the block
for (int i=0; i<=startIndex;i++) {
- row = (RowRecord)rowIter.next();
+ row = rowIter.next();
}
if (row == null) {
throw new RuntimeException("Did not find start row for block
" + block);
@@ -217,10 +217,10 @@
if (endIndex >= _rowRecords.size())
endIndex = _rowRecords.size()-1;
- Iterator rowIter = _rowRecords.values().iterator();
+ Iterator<RowRecord> rowIter = _rowRecords.values().iterator();
RowRecord row = null;
for (int i=0; i<=endIndex;i++) {
- row = (RowRecord)rowIter.next();
+ row = rowIter.next();
}
if (row == null) {
throw new RuntimeException("Did not find start row for block
" + block);
@@ -232,7 +232,7 @@
final int startIndex = blockIndex*DBCellRecord.BLOCK_SIZE;
final int endIndex = startIndex + DBCellRecord.BLOCK_SIZE;
- Iterator rowIterator = _rowRecords.values().iterator();
+ Iterator<RowRecord> rowIterator =
_rowRecords.values().iterator();
//Given that we basically iterate through the rows in order,
//For a performance improvement, it would be better to return
an instance of
@@ -289,7 +289,7 @@
}
}
- public Iterator getIterator() {
+ public Iterator<RowRecord> getIterator() {
return _rowRecords.values().iterator();
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]