Add Generics types to avoid warnings

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@894089 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Nick Burch 2009-12-27 18:16:12 +00:00
parent d033cf37f8
commit f0e176bfae
2 changed files with 9 additions and 9 deletions

View File

@ -129,11 +129,11 @@ public final class InternalSheet {
/** the DimensionsRecord is always present */ /** the DimensionsRecord is always present */
private DimensionsRecord _dimensions; private DimensionsRecord _dimensions;
/** always present */ /** always present */
protected final RowRecordsAggregate _rowsAggregate; protected final RowRecordsAggregate _rowsAggregate;
private DataValidityTable _dataValidityTable= null; private DataValidityTable _dataValidityTable= null;
private ConditionalFormattingTable condFormatting; private ConditionalFormattingTable condFormatting;
private Iterator rowRecIterator = null; private Iterator<RowRecord> rowRecIterator = null;
/** Add an UncalcedRecord if not true indicating formulas have not been calculated */ /** Add an UncalcedRecord if not true indicating formulas have not been calculated */
protected boolean _isUncalced = false; protected boolean _isUncalced = false;
@ -762,7 +762,7 @@ public final class InternalSheet {
{ {
return null; return null;
} }
return ( RowRecord ) rowRecIterator.next(); return rowRecIterator.next();
} }
/** /**

View File

@ -198,11 +198,11 @@ public final class RowRecordsAggregate extends RecordAggregate {
//an iterator and use that instance throughout, rather than recreating one and //an iterator and use that instance throughout, rather than recreating one and
//having to move it to the right position. //having to move it to the right position.
int startIndex = block * DBCellRecord.BLOCK_SIZE; int startIndex = block * DBCellRecord.BLOCK_SIZE;
Iterator rowIter = _rowRecords.values().iterator(); Iterator<RowRecord> rowIter = _rowRecords.values().iterator();
RowRecord row = null; RowRecord row = null;
//Position the iterator at the start of the block //Position the iterator at the start of the block
for (int i=0; i<=startIndex;i++) { for (int i=0; i<=startIndex;i++) {
row = (RowRecord)rowIter.next(); row = rowIter.next();
} }
if (row == null) { if (row == null) {
throw new RuntimeException("Did not find start row for block " + block); throw new RuntimeException("Did not find start row for block " + block);
@ -217,10 +217,10 @@ public final class RowRecordsAggregate extends RecordAggregate {
if (endIndex >= _rowRecords.size()) if (endIndex >= _rowRecords.size())
endIndex = _rowRecords.size()-1; endIndex = _rowRecords.size()-1;
Iterator rowIter = _rowRecords.values().iterator(); Iterator<RowRecord> rowIter = _rowRecords.values().iterator();
RowRecord row = null; RowRecord row = null;
for (int i=0; i<=endIndex;i++) { for (int i=0; i<=endIndex;i++) {
row = (RowRecord)rowIter.next(); row = rowIter.next();
} }
if (row == null) { if (row == null) {
throw new RuntimeException("Did not find start row for block " + block); throw new RuntimeException("Did not find start row for block " + block);
@ -232,7 +232,7 @@ public final class RowRecordsAggregate extends RecordAggregate {
final int startIndex = blockIndex*DBCellRecord.BLOCK_SIZE; final int startIndex = blockIndex*DBCellRecord.BLOCK_SIZE;
final int endIndex = startIndex + 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, //Given that we basically iterate through the rows in order,
//For a performance improvement, it would be better to return an instance of //For a performance improvement, it would be better to return an instance of
@ -289,7 +289,7 @@ public final class RowRecordsAggregate extends RecordAggregate {
} }
} }
public Iterator getIterator() { public Iterator<RowRecord> getIterator() {
return _rowRecords.values().iterator(); return _rowRecords.values().iterator();
} }