]> source.dussan.org Git - poi.git/commitdiff
Add Generics types to avoid warnings
authorNick Burch <nick@apache.org>
Sun, 27 Dec 2009 18:16:12 +0000 (18:16 +0000)
committerNick Burch <nick@apache.org>
Sun, 27 Dec 2009 18:16:12 +0000 (18:16 +0000)
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@894089 13f79535-47bb-0310-9956-ffa450edef68

src/java/org/apache/poi/hssf/model/InternalSheet.java
src/java/org/apache/poi/hssf/record/aggregates/RowRecordsAggregate.java

index a9414f20833126db6116b81efbd6b4f24167f9f6..aae5496a1e3e0c111946c2116bf0aa66648fefa3 100644 (file)
@@ -129,11 +129,11 @@ public final class InternalSheet {
     /** 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 @@ public final class InternalSheet {
         {
             return null;
         }
-        return ( RowRecord ) rowRecIterator.next();
+        return rowRecIterator.next();
     }
 
     /**
index ade64fba6f857d0a6a871514847b7417bd8e997a..7a3791e2b740b65f6dc2670a4fcc4f38aacc76fb 100644 (file)
@@ -198,11 +198,11 @@ public final class RowRecordsAggregate extends RecordAggregate {
          //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 @@ public final class RowRecordsAggregate extends RecordAggregate {
          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 @@ public final class RowRecordsAggregate extends RecordAggregate {
                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 final class RowRecordsAggregate extends RecordAggregate {
                }
        }
 
-       public Iterator getIterator() {
+       public Iterator<RowRecord> getIterator() {
                return _rowRecords.values().iterator();
        }