poi-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From one...@apache.org
Subject svn commit: r1813868 - /poi/trunk/src/java/org/apache/poi/ss/usermodel/charts/DataSources.java
Date Tue, 31 Oct 2017 10:17:38 GMT
Author: onealj
Date: Tue Oct 31 10:17:38 2017
New Revision: 1813868

URL: http://svn.apache.org/viewvc?rev=1813868&view=rev
Log:
github-68: add @Override to o.a.p.ss.usermodel.charts.DataSources. Thanks to Alain-Bearez.

Modified:
    poi/trunk/src/java/org/apache/poi/ss/usermodel/charts/DataSources.java

Modified: poi/trunk/src/java/org/apache/poi/ss/usermodel/charts/DataSources.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/ss/usermodel/charts/DataSources.java?rev=1813868&r1=1813867&r2=1813868&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/ss/usermodel/charts/DataSources.java (original)
+++ poi/trunk/src/java/org/apache/poi/ss/usermodel/charts/DataSources.java Tue Oct 31 10:17:38
2017
@@ -40,6 +40,7 @@ public class DataSources {
 
     public static ChartDataSource<Number> fromNumericCellRange(Sheet sheet, CellRangeAddress
cellRangeAddress) {
         return new AbstractCellRangeDataSource<Number>(sheet, cellRangeAddress) {
+            @Override
             public Number getPointAt(int index) {
                 CellValue cellValue = getCellValueAt(index);
                 if (cellValue != null && cellValue.getCellType() == CellType.NUMERIC)
{
@@ -49,6 +50,7 @@ public class DataSources {
                 }
             }
 
+            @Override
             public boolean isNumeric() {
                 return true;
             }
@@ -57,6 +59,7 @@ public class DataSources {
 
     public static ChartDataSource<String> fromStringCellRange(Sheet sheet, CellRangeAddress
cellRangeAddress) {
         return new AbstractCellRangeDataSource<String>(sheet, cellRangeAddress) {
+            @Override
             public String getPointAt(int index) {
                 CellValue cellValue = getCellValueAt(index);
                 if (cellValue != null && cellValue.getCellType() == CellType.STRING)
{
@@ -66,6 +69,7 @@ public class DataSources {
                 }
             }
 
+            @Override
             public boolean isNumeric() {
                 return false;
             }
@@ -80,23 +84,28 @@ public class DataSources {
             this.elements = elements.clone();
         }
 
+        @Override
         public int getPointCount() {
             return elements.length;
         }
 
+        @Override
         public T getPointAt(int index) {
             return elements[index];
         }
 
+        @Override
         public boolean isReference() {
             return false;
         }
 
+        @Override
         public boolean isNumeric() {
             Class<?> arrayComponentType = elements.getClass().getComponentType();
             return (Number.class.isAssignableFrom(arrayComponentType));
         }
 
+        @Override
         public String getFormulaString() {
             throw new UnsupportedOperationException("Literal data source can not be expressed
by reference.");
         }
@@ -116,14 +125,17 @@ public class DataSources {
             this.evaluator = sheet.getWorkbook().getCreationHelper().createFormulaEvaluator();
         }
 
+        @Override
         public int getPointCount() {
             return numOfCells;
         }
 
+        @Override
         public boolean isReference() {
             return true;
         }
 
+        @Override
         public String getFormulaString() {
             return cellRangeAddress.formatAsString(sheet.getSheetName(), true);
         }



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@poi.apache.org
For additional commands, e-mail: commits-help@poi.apache.org


Mime
View raw message