You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@poi.apache.org by ki...@apache.org on 2021/04/14 22:53:38 UTC
svn commit: r1888780 [9/13] - in /poi/trunk:
poi-examples/src/main/java/org/apache/poi/examples/hslf/
poi-examples/src/main/java/org/apache/poi/examples/hssf/eventusermodel/
poi-examples/src/main/java/org/apache/poi/examples/hssf/usermodel/
poi-example...
Modified: poi/trunk/poi/src/main/java/org/apache/poi/ss/formula/constant/ErrorConstant.java
URL: http://svn.apache.org/viewvc/poi/trunk/poi/src/main/java/org/apache/poi/ss/formula/constant/ErrorConstant.java?rev=1888780&r1=1888779&r2=1888780&view=diff
==============================================================================
--- poi/trunk/poi/src/main/java/org/apache/poi/ss/formula/constant/ErrorConstant.java (original)
+++ poi/trunk/poi/src/main/java/org/apache/poi/ss/formula/constant/ErrorConstant.java Wed Apr 14 22:53:33 2021
@@ -27,7 +27,7 @@ import static org.apache.logging.log4j.u
* Represents a constant error code value as encoded in a constant values array. <p>
*
* This class is a type-safe wrapper for a 16-bit int value performing a similar job to
- * <tt>ErrorEval</tt>.
+ * {@code ErrorEval}.
*/
public final class ErrorConstant {
private static final Logger LOG = LogManager.getLogger(ErrorConstant.class);
@@ -74,10 +74,6 @@ public final class ErrorConstant {
}
public String toString() {
- StringBuilder sb = new StringBuilder(64);
- sb.append(getClass().getName()).append(" [");
- sb.append(getText());
- sb.append("]");
- return sb.toString();
+ return getClass().getName() + " [" + getText() + "]";
}
}
Modified: poi/trunk/poi/src/main/java/org/apache/poi/ss/formula/eval/AreaEvalBase.java
URL: http://svn.apache.org/viewvc/poi/trunk/poi/src/main/java/org/apache/poi/ss/formula/eval/AreaEvalBase.java?rev=1888780&r1=1888779&r2=1888780&view=diff
==============================================================================
--- poi/trunk/poi/src/main/java/org/apache/poi/ss/formula/eval/AreaEvalBase.java (original)
+++ poi/trunk/poi/src/main/java/org/apache/poi/ss/formula/eval/AreaEvalBase.java Wed Apr 14 22:53:33 2021
@@ -20,9 +20,6 @@ package org.apache.poi.ss.formula.eval;
import org.apache.poi.ss.formula.SheetRange;
import org.apache.poi.ss.formula.ptg.AreaI;
-/**
- * @author Josh Micich
- */
public abstract class AreaEvalBase implements AreaEval {
private final int _firstSheet;
@@ -42,7 +39,7 @@ public abstract class AreaEvalBase imple
_nColumns = _lastColumn - _firstColumn + 1;
_nRows = _lastRow - _firstRow + 1;
-
+
if (sheets != null) {
_firstSheet = sheets.getFirstSheetIndex();
_lastSheet = sheets.getLastSheetIndex();
@@ -77,14 +74,14 @@ public abstract class AreaEvalBase imple
public final int getLastRow() {
return _lastRow;
}
-
+
public int getFirstSheetIndex() {
return _firstSheet;
}
public int getLastSheetIndex() {
return _lastSheet;
}
-
+
public final ValueEval getAbsoluteValue(int row, int col) {
int rowOffsetIx = row - _firstRow;
int colOffsetIx = col - _firstColumn;
Modified: poi/trunk/poi/src/main/java/org/apache/poi/ss/formula/eval/BlankEval.java
URL: http://svn.apache.org/viewvc/poi/trunk/poi/src/main/java/org/apache/poi/ss/formula/eval/BlankEval.java?rev=1888780&r1=1888779&r2=1888780&view=diff
==============================================================================
--- poi/trunk/poi/src/main/java/org/apache/poi/ss/formula/eval/BlankEval.java (original)
+++ poi/trunk/poi/src/main/java/org/apache/poi/ss/formula/eval/BlankEval.java Wed Apr 14 22:53:33 2021
@@ -18,8 +18,7 @@
package org.apache.poi.ss.formula.eval;
/**
- * @author Amol S. Deshmukh < amolweb at ya hoo dot com > This class is a
- * marker class. It is a special value for empty cells.
+ * This class is a marker class. It is a special value for empty cells.
*/
public final class BlankEval implements ValueEval {
Modified: poi/trunk/poi/src/main/java/org/apache/poi/ss/formula/eval/BoolEval.java
URL: http://svn.apache.org/viewvc/poi/trunk/poi/src/main/java/org/apache/poi/ss/formula/eval/BoolEval.java?rev=1888780&r1=1888779&r2=1888780&view=diff
==============================================================================
--- poi/trunk/poi/src/main/java/org/apache/poi/ss/formula/eval/BoolEval.java (original)
+++ poi/trunk/poi/src/main/java/org/apache/poi/ss/formula/eval/BoolEval.java Wed Apr 14 22:53:33 2021
@@ -17,12 +17,9 @@
package org.apache.poi.ss.formula.eval;
-/**
- * @author Amol S. Deshmukh < amolweb at ya hoo dot com >
- */
public final class BoolEval implements NumericValueEval, StringValueEval {
- private boolean _value;
+ private final boolean _value;
public static final BoolEval FALSE = new BoolEval(false);
@@ -30,9 +27,9 @@ public final class BoolEval implements N
/**
* Convenience method for the following:<br>
- * <code>(b ? BoolEval.TRUE : BoolEval.FALSE)</code>
+ * {@code (b ? BoolEval.TRUE : BoolEval.FALSE)}
*
- * @return the <tt>BoolEval</tt> instance representing <tt>b</tt>.
+ * @return the {@code BoolEval} instance representing {@code b}.
*/
public static BoolEval valueOf(boolean b) {
return b ? TRUE : FALSE;
@@ -46,10 +43,12 @@ public final class BoolEval implements N
return _value;
}
+ @Override
public double getNumberValue() {
return _value ? 1 : 0;
}
+ @Override
public String getStringValue() {
return _value ? "TRUE" : "FALSE";
}
Modified: poi/trunk/poi/src/main/java/org/apache/poi/ss/formula/eval/ConcatEval.java
URL: http://svn.apache.org/viewvc/poi/trunk/poi/src/main/java/org/apache/poi/ss/formula/eval/ConcatEval.java?rev=1888780&r1=1888779&r2=1888780&view=diff
==============================================================================
--- poi/trunk/poi/src/main/java/org/apache/poi/ss/formula/eval/ConcatEval.java (original)
+++ poi/trunk/poi/src/main/java/org/apache/poi/ss/formula/eval/ConcatEval.java Wed Apr 14 22:53:33 2021
@@ -20,9 +20,6 @@ package org.apache.poi.ss.formula.eval;
import org.apache.poi.ss.formula.functions.Fixed2ArgFunction;
import org.apache.poi.ss.formula.functions.Function;
-/**
- * @author Amol S. Deshmukh < amolweb at ya hoo dot com >
- */
public final class ConcatEval extends Fixed2ArgFunction {
public static final Function instance = new ConcatEval();
Modified: poi/trunk/poi/src/main/java/org/apache/poi/ss/formula/eval/EvaluationException.java
URL: http://svn.apache.org/viewvc/poi/trunk/poi/src/main/java/org/apache/poi/ss/formula/eval/EvaluationException.java?rev=1888780&r1=1888779&r2=1888780&view=diff
==============================================================================
--- poi/trunk/poi/src/main/java/org/apache/poi/ss/formula/eval/EvaluationException.java (original)
+++ poi/trunk/poi/src/main/java/org/apache/poi/ss/formula/eval/EvaluationException.java Wed Apr 14 22:53:33 2021
@@ -19,10 +19,10 @@ package org.apache.poi.ss.formula.eval;
/**
* This class is used to simplify error handling logic <i>within</i> operator and function
- * implementations. Note - <tt>OperationEval.evaluate()</tt> and <tt>Function.evaluate()</tt>
+ * implementations. Note - {@code OperationEval.evaluate()} and {@code Function.evaluate()}
* method signatures do not throw this exception so it cannot propagate outside.<p>
*
- * Here is an example coded without <tt>EvaluationException</tt>, to show how it can help:
+ * Here is an example coded without {@code EvaluationException}, to show how it can help:
* <pre>{@code
* public Eval evaluate(Eval[] args, int srcRow, short srcCol) {
* // ...
@@ -52,8 +52,9 @@ package org.apache.poi.ss.formula.eval;
* In this example, if any error is encountered while processing the arguments, an error is
* returned immediately. This code is difficult to refactor due to all the points where errors
* are returned.<br>
- * Using <tt>EvaluationException</tt> allows the error returning code to be consolidated to one
- * place.<p>
+ * Using {@code EvaluationException} allows the error returning code to be consolidated to one
+ * place.
+ *
* <pre>{@code
* public Eval evaluate(Eval[] args, int srcRow, short srcCol) {
* try {
@@ -100,12 +101,10 @@ package org.apache.poi.ss.formula.eval;
* error), because exceptions conveniently propagate up the call stack regardless of execution
* points or the number of levels of nested calls.<p>
*
- * <b>Note</b> - Only standard evaluation errors are represented by <tt>EvaluationException</tt> (
+ * <b>Note</b> - Only standard evaluation errors are represented by {@code EvaluationException} (
* i.e. conditions expected to be encountered when evaluating arbitrary Excel formulas). Conditions
* that could never occur in an Excel spreadsheet should result in runtime exceptions. Care should
* be taken to not translate any POI internal error into an Excel evaluation error code.
- *
- * @author Josh Micich
*/
public final class EvaluationException extends Exception {
private final ErrorEval _errorEval;
Modified: poi/trunk/poi/src/main/java/org/apache/poi/ss/formula/eval/FunctionNameEval.java
URL: http://svn.apache.org/viewvc/poi/trunk/poi/src/main/java/org/apache/poi/ss/formula/eval/FunctionNameEval.java?rev=1888780&r1=1888779&r2=1888780&view=diff
==============================================================================
--- poi/trunk/poi/src/main/java/org/apache/poi/ss/formula/eval/FunctionNameEval.java (original)
+++ poi/trunk/poi/src/main/java/org/apache/poi/ss/formula/eval/FunctionNameEval.java Wed Apr 14 22:53:33 2021
@@ -17,9 +17,6 @@
package org.apache.poi.ss.formula.eval;
-/**
- * @author Josh Micich
- */
public final class FunctionNameEval implements ValueEval {
private final String _functionName;
Modified: poi/trunk/poi/src/main/java/org/apache/poi/ss/formula/eval/IntersectionEval.java
URL: http://svn.apache.org/viewvc/poi/trunk/poi/src/main/java/org/apache/poi/ss/formula/eval/IntersectionEval.java?rev=1888780&r1=1888779&r2=1888780&view=diff
==============================================================================
--- poi/trunk/poi/src/main/java/org/apache/poi/ss/formula/eval/IntersectionEval.java (original)
+++ poi/trunk/poi/src/main/java/org/apache/poi/ss/formula/eval/IntersectionEval.java Wed Apr 14 22:53:33 2021
@@ -20,9 +20,6 @@ package org.apache.poi.ss.formula.eval;
import org.apache.poi.ss.formula.functions.Fixed2ArgFunction;
import org.apache.poi.ss.formula.functions.Function;
-/**
- * @author Josh Micich
- */
public final class IntersectionEval extends Fixed2ArgFunction {
public static final Function instance = new IntersectionEval();
@@ -31,6 +28,7 @@ public final class IntersectionEval ext
// enforces singleton
}
+ @Override
public ValueEval evaluate(int srcRowIndex, int srcColumnIndex, ValueEval arg0, ValueEval arg1) {
try {
@@ -48,7 +46,7 @@ public final class IntersectionEval ext
/**
* @return simple rectangular {@link AreaEval} which represents the intersection of areas
- * <tt>aeA</tt> and <tt>aeB</tt>. If the two areas do not intersect, the result is <code>null</code>.
+ * {@code aeA} and {@code aeB}. If the two areas do not intersect, the result is {@code null}.
*/
private static AreaEval resolveRange(AreaEval aeA, AreaEval aeB) {
Modified: poi/trunk/poi/src/main/java/org/apache/poi/ss/formula/eval/MissingArgEval.java
URL: http://svn.apache.org/viewvc/poi/trunk/poi/src/main/java/org/apache/poi/ss/formula/eval/MissingArgEval.java?rev=1888780&r1=1888779&r2=1888780&view=diff
==============================================================================
--- poi/trunk/poi/src/main/java/org/apache/poi/ss/formula/eval/MissingArgEval.java (original)
+++ poi/trunk/poi/src/main/java/org/apache/poi/ss/formula/eval/MissingArgEval.java Wed Apr 14 22:53:33 2021
@@ -23,8 +23,6 @@ package org.apache.poi.ss.formula.eval;
* COUNT and COUNTA <em>do</em> count their missing args. Note - the differences between
* {@link MissingArgEval} and {@link BlankEval} have not been investigated fully, so the POI
* evaluator may need to be updated to account for these as they are found.
- *
- * @author Josh Micich
*/
public final class MissingArgEval implements ValueEval {
Modified: poi/trunk/poi/src/main/java/org/apache/poi/ss/formula/eval/NumberEval.java
URL: http://svn.apache.org/viewvc/poi/trunk/poi/src/main/java/org/apache/poi/ss/formula/eval/NumberEval.java?rev=1888780&r1=1888779&r2=1888780&view=diff
==============================================================================
--- poi/trunk/poi/src/main/java/org/apache/poi/ss/formula/eval/NumberEval.java (original)
+++ poi/trunk/poi/src/main/java/org/apache/poi/ss/formula/eval/NumberEval.java Wed Apr 14 22:53:33 2021
@@ -25,12 +25,8 @@ import org.apache.poi.ss.formula.ptg.Num
import org.apache.poi.ss.formula.ptg.Ptg;
import org.apache.poi.ss.util.NumberToTextConverter;
-/**
- * @author Amol S. Deshmukh < amolweb at ya hoo dot com >
- *
- */
public final class NumberEval implements NumericValueEval, StringValueEval {
-
+
public static final NumberEval ZERO = new NumberEval(0);
private final double _value;
Modified: poi/trunk/poi/src/main/java/org/apache/poi/ss/formula/eval/NumericValueEval.java
URL: http://svn.apache.org/viewvc/poi/trunk/poi/src/main/java/org/apache/poi/ss/formula/eval/NumericValueEval.java?rev=1888780&r1=1888779&r2=1888780&view=diff
==============================================================================
--- poi/trunk/poi/src/main/java/org/apache/poi/ss/formula/eval/NumericValueEval.java (original)
+++ poi/trunk/poi/src/main/java/org/apache/poi/ss/formula/eval/NumericValueEval.java Wed Apr 14 22:53:33 2021
@@ -14,16 +14,8 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-/*
- * Created on May 8, 2005
- *
- */
package org.apache.poi.ss.formula.eval;
-/**
- * @author Amol S. Deshmukh < amolweb at ya hoo dot com >
- *
- */
public interface NumericValueEval extends ValueEval {
double getNumberValue();
Modified: poi/trunk/poi/src/main/java/org/apache/poi/ss/formula/eval/OperandResolver.java
URL: http://svn.apache.org/viewvc/poi/trunk/poi/src/main/java/org/apache/poi/ss/formula/eval/OperandResolver.java?rev=1888780&r1=1888779&r2=1888780&view=diff
==============================================================================
--- poi/trunk/poi/src/main/java/org/apache/poi/ss/formula/eval/OperandResolver.java (original)
+++ poi/trunk/poi/src/main/java/org/apache/poi/ss/formula/eval/OperandResolver.java Wed Apr 14 22:53:33 2021
@@ -26,9 +26,6 @@ import java.util.regex.Pattern;
/**
* Provides functionality for evaluating arguments to functions and operators.
- *
- * @author Josh Micich
- * @author Brendan Nolan
*/
public final class OperandResolver {
@@ -43,7 +40,7 @@ public final class OperandResolver {
"(\\."+Digits+"("+Exp+")?))"+
"[\\x00-\\x20]*");
private static final Pattern fpPattern = Pattern.compile(fpRegex);
-
+
private OperandResolver() {
// no instances of this class
}
@@ -54,8 +51,8 @@ public final class OperandResolver {
* @param arg the evaluated argument as passed to the function or operator.
* @param srcCellRow used when arg is a single column AreaRef
* @param srcCellCol used when arg is a single row AreaRef
- * @return a <tt>NumberEval</tt>, <tt>StringEval</tt>, <tt>BoolEval</tt> or <tt>BlankEval</tt>.
- * Never <code>null</code> or <tt>ErrorEval</tt>.
+ * @return a {@code NumberEval}, {@code StringEval}, {@code BoolEval} or {@code BlankEval}.
+ * Never {@code null} or {@code ErrorEval}.
* @throws EvaluationException if srcCellRow or srcCellCol do not properly index into
* an AreaEval. If the actual value retrieved is an ErrorEval, a corresponding
* EvaluationException is thrown.
@@ -75,15 +72,15 @@ public final class OperandResolver {
}
return result;
}
-
+
/**
* Retrieves a single value from an area evaluation utilizing the 2D indices of the cell
* within its own area reference to index the value in the area evaluation.
*
* @param ae area reference after evaluation
* @param cell the source cell of the formula that contains its 2D indices
- * @return a <tt>NumberEval</tt>, <tt>StringEval</tt>, <tt>BoolEval</tt> or <tt>BlankEval</tt>. or <tt>ErrorEval<tt>
- * Never <code>null</code>.
+ * @return a {@code NumberEval}, {@code StringEval}, {@code BoolEval} or {@code BlankEval}. or {@code ErrorEval}
+ * Never {@code null}.
*/
public static ValueEval getElementFromArray(AreaEval ae, EvaluationCell cell) {
@@ -105,7 +102,7 @@ public final class OperandResolver {
else if (ae.isRow() && relativeColIndex < ae.getWidth()) {
return ae.getRelativeValue(0, relativeColIndex);
}
-
+
return ErrorEval.NA;
}
@@ -142,14 +139,14 @@ public final class OperandResolver {
*
* Of course with carefully (or carelessly) chosen parameters, cyclic references can occur and
* hence this method <b>can</b> throw a 'circular reference' EvaluationException. Note that
- * this method does not attempt to detect cycles. Every cell in the specified Area <tt>ae</tt>
+ * this method does not attempt to detect cycles. Every cell in the specified Area {@code ae}
* has already been evaluated prior to this method call. Any cell (or cell<b>s</b>) part of
- * <tt>ae</tt> that would incur a cyclic reference error if selected by this method, will
- * already have the value <t>ErrorEval.CIRCULAR_REF_ERROR</tt> upon entry to this method. It
+ * {@code ae} that would incur a cyclic reference error if selected by this method, will
+ * already have the value {@code ErrorEval.CIRCULAR_REF_ERROR} upon entry to this method. It
* is assumed logic exists elsewhere to produce this behaviour.
*
- * @return whatever the selected cell's evaluated value is. Never <code>null</code>. Never
- * <tt>ErrorEval</tt>.
+ * @return whatever the selected cell's evaluated value is. Never {@code null}. Never
+ * {@code ErrorEval}.
* @throws EvaluationException if there is a problem with indexing into the area, or if the
* evaluated cell has an error.
*/
@@ -163,7 +160,7 @@ public final class OperandResolver {
}
/**
- * @return possibly <tt>ErrorEval</tt>, and <code>null</code>
+ * @return possibly {@code ErrorEval}, and {@code null}
*/
private static ValueEval chooseSingleElementFromAreaInternal(AreaEval ae,
int srcCellRow, int srcCellCol) throws EvaluationException {
@@ -212,21 +209,21 @@ public final class OperandResolver {
}
return ae.getAbsoluteValue(ae.getFirstRow(), srcCellCol);
}
-
+
private static ValueEval chooseSingleElementFromRef(RefEval ref) {
return ref.getInnerValueEval( ref.getFirstSheetIndex() );
}
/**
* Applies some conversion rules if the supplied value is not already an integer.<br>
- * Value is first coerced to a <tt>double</tt> ( See <tt>coerceValueToDouble()</tt> ).
- * Note - <tt>BlankEval</tt> is converted to <code>0</code>.<p>
+ * Value is first coerced to a {@code double} ( See {@code coerceValueToDouble()} ).
+ * Note - {@code BlankEval} is converted to {@code 0}.<p>
*
* Excel typically converts doubles to integers by truncating toward negative infinity.<br>
* The equivalent java code is:<br>
- * <code>return (int)Math.floor(d);</code><br>
+ * {@code return (int)Math.floor(d);}<br>
* <b>not</b>:<br>
- * <code>return (int)d; // wrong - rounds toward zero</code>
+ * {@code return (int)d; // wrong - rounds toward zero}
*
*/
public static int coerceValueToInt(ValueEval ev) throws EvaluationException {
@@ -241,12 +238,12 @@ public final class OperandResolver {
/**
* Applies some conversion rules if the supplied value is not already a number.
- * Note - <tt>BlankEval</tt> is converted to {@link NumberEval#ZERO}.
+ * Note - {@code BlankEval} is converted to {@link NumberEval#ZERO}.
* @param ev must be a {@link NumberEval}, {@link StringEval}, {@link BoolEval} or
* {@link BlankEval}
* @return actual, parsed or interpreted double value (respectively).
* @throws EvaluationException if a StringEval is supplied and cannot be parsed
- * as a double (See <tt>parseDouble()</tt> for allowable formats).
+ * as a double (See {@code parseDouble()} for allowable formats).
* @throws RuntimeException if the supplied parameter is not {@link NumberEval},
* {@link StringEval}, {@link BoolEval} or {@link BlankEval}
*/
@@ -266,7 +263,7 @@ public final class OperandResolver {
if (dd == null) {
throw EvaluationException.invalidValue();
}
- return dd.doubleValue();
+ return dd;
}
throw new RuntimeException("Unexpected arg eval type (" + ev.getClass().getName() + ")");
}
@@ -274,8 +271,8 @@ public final class OperandResolver {
/**
* Converts a string to a double using standard rules that Excel would use.<br>
* Tolerates leading and trailing spaces, <p>
- *
- * Doesn't support currency prefixes, commas, percentage signs or arithmetic operations strings.
+ *
+ * Doesn't support currency prefixes, commas, percentage signs or arithmetic operations strings.
*
* Some examples:<br>
* " 123 " -> 123.0<br>
@@ -288,7 +285,7 @@ public final class OperandResolver {
* "5**2" -> 500<br>
* "250%" -> 2.5<br>
*
- * @return <code>null</code> if the specified text cannot be parsed as a number
+ * @return {@code null} if the specified text cannot be parsed as a number
*/
public static Double parseDouble(String pText) {
@@ -301,7 +298,7 @@ public final class OperandResolver {
else {
return null;
}
-
+
}
public static Double parseDateTime(String pText) {
@@ -315,8 +312,8 @@ public final class OperandResolver {
}
/**
- * @param ve must be a <tt>NumberEval</tt>, <tt>StringEval</tt>, <tt>BoolEval</tt>, or <tt>BlankEval</tt>
- * @return the converted string value. never <code>null</code>
+ * @param ve must be a {@code NumberEval}, {@code StringEval}, {@code BoolEval}, or {@code BlankEval}
+ * @return the converted string value. never {@code null}
*/
public static String coerceValueToString(ValueEval ve) {
if (ve instanceof StringValueEval) {
@@ -330,7 +327,7 @@ public final class OperandResolver {
}
/**
- * @return <code>null</code> to represent blank values
+ * @return {@code null} to represent blank values
* @throws EvaluationException if ve is an ErrorEval, or if a string value cannot be converted
*/
public static Boolean coerceValueToBoolean(ValueEval ve, boolean stringsAreBlanks) throws EvaluationException {
@@ -340,7 +337,7 @@ public final class OperandResolver {
return null;
}
if (ve instanceof BoolEval) {
- return Boolean.valueOf(((BoolEval) ve).getBooleanValue());
+ return ((BoolEval) ve).getBooleanValue();
}
if (ve instanceof StringEval) {
@@ -364,7 +361,7 @@ public final class OperandResolver {
if (Double.isNaN(d)) {
throw new EvaluationException(ErrorEval.VALUE_INVALID);
}
- return Boolean.valueOf(d != 0);
+ return d != 0;
}
if (ve instanceof ErrorEval) {
throw new EvaluationException((ErrorEval) ve);
Modified: poi/trunk/poi/src/main/java/org/apache/poi/ss/formula/eval/PercentEval.java
URL: http://svn.apache.org/viewvc/poi/trunk/poi/src/main/java/org/apache/poi/ss/formula/eval/PercentEval.java?rev=1888780&r1=1888779&r2=1888780&view=diff
==============================================================================
--- poi/trunk/poi/src/main/java/org/apache/poi/ss/formula/eval/PercentEval.java (original)
+++ poi/trunk/poi/src/main/java/org/apache/poi/ss/formula/eval/PercentEval.java Wed Apr 14 22:53:33 2021
@@ -23,7 +23,6 @@ import org.apache.poi.ss.formula.functio
/**
* Implementation of Excel formula token '%'. <p>
- * @author Josh Micich
*/
public final class PercentEval extends Fixed1ArgFunction {
Modified: poi/trunk/poi/src/main/java/org/apache/poi/ss/formula/eval/RangeEval.java
URL: http://svn.apache.org/viewvc/poi/trunk/poi/src/main/java/org/apache/poi/ss/formula/eval/RangeEval.java?rev=1888780&r1=1888779&r2=1888780&view=diff
==============================================================================
--- poi/trunk/poi/src/main/java/org/apache/poi/ss/formula/eval/RangeEval.java (original)
+++ poi/trunk/poi/src/main/java/org/apache/poi/ss/formula/eval/RangeEval.java Wed Apr 14 22:53:33 2021
@@ -21,10 +21,6 @@ import org.apache.poi.ss.formula.functio
import org.apache.poi.ss.formula.functions.Function;
-/**
- *
- * @author Josh Micich
- */
public final class RangeEval extends Fixed2ArgFunction {
public static final Function instance = new RangeEval();
@@ -33,6 +29,7 @@ public final class RangeEval extends Fix
// enforces singleton
}
+ @Override
public ValueEval evaluate(int srcRowIndex, int srcColumnIndex, ValueEval arg0, ValueEval arg1) {
try {
@@ -46,7 +43,7 @@ public final class RangeEval extends Fix
/**
* @return simple rectangular {@link AreaEval} which fully encloses both areas
- * <tt>aeA</tt> and <tt>aeB</tt>
+ * {@code aeA} and {@code aeB}
*/
private static AreaEval resolveRange(AreaEval aeA, AreaEval aeB) {
int aeAfr = aeA.getFirstRow();
Modified: poi/trunk/poi/src/main/java/org/apache/poi/ss/formula/eval/RelationalOperationEval.java
URL: http://svn.apache.org/viewvc/poi/trunk/poi/src/main/java/org/apache/poi/ss/formula/eval/RelationalOperationEval.java?rev=1888780&r1=1888779&r2=1888780&view=diff
==============================================================================
--- poi/trunk/poi/src/main/java/org/apache/poi/ss/formula/eval/RelationalOperationEval.java (original)
+++ poi/trunk/poi/src/main/java/org/apache/poi/ss/formula/eval/RelationalOperationEval.java Wed Apr 14 22:53:33 2021
@@ -24,8 +24,6 @@ import org.apache.poi.ss.util.NumberComp
/**
* Base class for all comparison operator evaluators
- *
- * @author Amol S. Deshmukh < amolweb at ya hoo dot com >
*/
public abstract class RelationalOperationEval extends Fixed2ArgFunction implements ArrayFunction {
Modified: poi/trunk/poi/src/main/java/org/apache/poi/ss/formula/eval/StringEval.java
URL: http://svn.apache.org/viewvc/poi/trunk/poi/src/main/java/org/apache/poi/ss/formula/eval/StringEval.java?rev=1888780&r1=1888779&r2=1888780&view=diff
==============================================================================
--- poi/trunk/poi/src/main/java/org/apache/poi/ss/formula/eval/StringEval.java (original)
+++ poi/trunk/poi/src/main/java/org/apache/poi/ss/formula/eval/StringEval.java Wed Apr 14 22:53:33 2021
@@ -22,9 +22,6 @@ package org.apache.poi.ss.formula.eval;
import org.apache.poi.ss.formula.ptg.Ptg;
import org.apache.poi.ss.formula.ptg.StringPtg;
-/**
- * @author Amol S. Deshmukh < amolweb at ya hoo dot com >
- */
public final class StringEval implements StringValueEval {
public static final StringEval EMPTY_INSTANCE = new StringEval("");
Modified: poi/trunk/poi/src/main/java/org/apache/poi/ss/formula/eval/StringValueEval.java
URL: http://svn.apache.org/viewvc/poi/trunk/poi/src/main/java/org/apache/poi/ss/formula/eval/StringValueEval.java?rev=1888780&r1=1888779&r2=1888780&view=diff
==============================================================================
--- poi/trunk/poi/src/main/java/org/apache/poi/ss/formula/eval/StringValueEval.java (original)
+++ poi/trunk/poi/src/main/java/org/apache/poi/ss/formula/eval/StringValueEval.java Wed Apr 14 22:53:33 2021
@@ -17,10 +17,6 @@
package org.apache.poi.ss.formula.eval;
-/**
- * @author Amol S. Deshmukh < amolweb at ya hoo dot com >
- *
- */
public interface StringValueEval extends ValueEval {
/**
Modified: poi/trunk/poi/src/main/java/org/apache/poi/ss/formula/eval/TwoOperandNumericOperation.java
URL: http://svn.apache.org/viewvc/poi/trunk/poi/src/main/java/org/apache/poi/ss/formula/eval/TwoOperandNumericOperation.java?rev=1888780&r1=1888779&r2=1888780&view=diff
==============================================================================
--- poi/trunk/poi/src/main/java/org/apache/poi/ss/formula/eval/TwoOperandNumericOperation.java (original)
+++ poi/trunk/poi/src/main/java/org/apache/poi/ss/formula/eval/TwoOperandNumericOperation.java Wed Apr 14 22:53:33 2021
@@ -23,16 +23,13 @@ import org.apache.poi.ss.formula.functio
import org.apache.poi.ss.formula.functions.MatrixFunction.MutableValueCollector;
import org.apache.poi.ss.formula.functions.MatrixFunction.TwoArrayArg;
-/**
- * @author Josh Micich
- */
public abstract class TwoOperandNumericOperation extends Fixed2ArgFunction implements ArrayFunction {
protected final double singleOperandEvaluate(ValueEval arg, int srcCellRow, int srcCellCol) throws EvaluationException {
ValueEval ve = OperandResolver.getSingleValue(arg, srcCellRow, srcCellCol);
return OperandResolver.coerceValueToDouble(ve);
}
-
+
public ValueEval evaluateArray(ValueEval[] args, int srcRowIndex, int srcColumnIndex) {
if (args.length != 2) {
return ErrorEval.VALUE_INVALID;
@@ -52,7 +49,7 @@ public abstract class TwoOperandNumericO
});
}
-
+
public ValueEval evaluate(int srcRowIndex, int srcColumnIndex, ValueEval arg0, ValueEval arg1) {
double result;
try {
@@ -78,27 +75,27 @@ public abstract class TwoOperandNumericO
private final class ArrayEval extends TwoArrayArg {
private final MutableValueCollector instance = new MutableValueCollector(true, true);
-
+
protected double[] collectValues(ValueEval arg) throws EvaluationException {
return instance.collectValues(arg);
}
-
+
protected double[][] evaluate(double[][] d1, double[][] d2) throws IllegalArgumentException, EvaluationException {
int width = (d1[0].length < d2[0].length) ? d1[0].length : d2[0].length;
int height = (d1.length < d2.length) ? d1.length : d2.length;
double[][] result = new double[height][width];
-
+
for (int j = 0; j < height; j++) {
for (int i = 0; i < width; i++) {
result[j][i] = TwoOperandNumericOperation.this.evaluate(d1[j][i], d2[j][i]);
}
}
-
+
return result;
}
}
-
+
public static final Function AddEval = new TwoOperandNumericOperation() {
protected double evaluate(double d0, double d1) {
return d0+d1;
Modified: poi/trunk/poi/src/main/java/org/apache/poi/ss/formula/eval/UnaryMinusEval.java
URL: http://svn.apache.org/viewvc/poi/trunk/poi/src/main/java/org/apache/poi/ss/formula/eval/UnaryMinusEval.java?rev=1888780&r1=1888779&r2=1888780&view=diff
==============================================================================
--- poi/trunk/poi/src/main/java/org/apache/poi/ss/formula/eval/UnaryMinusEval.java (original)
+++ poi/trunk/poi/src/main/java/org/apache/poi/ss/formula/eval/UnaryMinusEval.java Wed Apr 14 22:53:33 2021
@@ -21,9 +21,6 @@ import org.apache.poi.ss.formula.functio
import org.apache.poi.ss.formula.functions.Fixed1ArgFunction;
import org.apache.poi.ss.formula.functions.Function;
-/**
- * @author Amol S. Deshmukh < amolweb at ya hoo dot com >
- */
public final class UnaryMinusEval extends Fixed1ArgFunction implements ArrayFunction {
public static final Function instance = new UnaryMinusEval();
Modified: poi/trunk/poi/src/main/java/org/apache/poi/ss/formula/eval/UnaryPlusEval.java
URL: http://svn.apache.org/viewvc/poi/trunk/poi/src/main/java/org/apache/poi/ss/formula/eval/UnaryPlusEval.java?rev=1888780&r1=1888779&r2=1888780&view=diff
==============================================================================
--- poi/trunk/poi/src/main/java/org/apache/poi/ss/formula/eval/UnaryPlusEval.java (original)
+++ poi/trunk/poi/src/main/java/org/apache/poi/ss/formula/eval/UnaryPlusEval.java Wed Apr 14 22:53:33 2021
@@ -22,9 +22,6 @@ import org.apache.poi.ss.formula.functio
import org.apache.poi.ss.formula.functions.Function;
-/**
- * @author Amol S. Deshmukh < amolweb at ya hoo dot com >
- */
public final class UnaryPlusEval extends Fixed1ArgFunction implements ArrayFunction {
public static final Function instance = new UnaryPlusEval();
Modified: poi/trunk/poi/src/main/java/org/apache/poi/ss/formula/eval/ValueEval.java
URL: http://svn.apache.org/viewvc/poi/trunk/poi/src/main/java/org/apache/poi/ss/formula/eval/ValueEval.java?rev=1888780&r1=1888779&r2=1888780&view=diff
==============================================================================
--- poi/trunk/poi/src/main/java/org/apache/poi/ss/formula/eval/ValueEval.java (original)
+++ poi/trunk/poi/src/main/java/org/apache/poi/ss/formula/eval/ValueEval.java Wed Apr 14 22:53:33 2021
@@ -17,9 +17,6 @@
package org.apache.poi.ss.formula.eval;
-/**
- * @author Amol S. Deshmukh < amolweb at ya hoo dot com >
- */
public interface ValueEval {
// no methods
}
Modified: poi/trunk/poi/src/main/java/org/apache/poi/ss/formula/eval/forked/ForkedEvaluationCell.java
URL: http://svn.apache.org/viewvc/poi/trunk/poi/src/main/java/org/apache/poi/ss/formula/eval/forked/ForkedEvaluationCell.java?rev=1888780&r1=1888779&r2=1888780&view=diff
==============================================================================
--- poi/trunk/poi/src/main/java/org/apache/poi/ss/formula/eval/forked/ForkedEvaluationCell.java (original)
+++ poi/trunk/poi/src/main/java/org/apache/poi/ss/formula/eval/forked/ForkedEvaluationCell.java Wed Apr 14 22:53:33 2021
@@ -32,8 +32,6 @@ import org.apache.poi.ss.util.CellRangeA
/**
* Represents a cell being used for forked evaluation that has had a value set different from the
* corresponding cell in the shared master workbook.
- *
- * @author Josh Micich
*/
final class ForkedEvaluationCell implements EvaluationCell {
@@ -140,12 +138,12 @@ final class ForkedEvaluationCell impleme
public int getColumnIndex() {
return _masterCell.getColumnIndex();
}
-
+
@Override
public CellRangeAddress getArrayFormulaRange() {
return _masterCell.getArrayFormulaRange();
}
-
+
@Override
public boolean isPartOfArrayFormulaGroup() {
return _masterCell.isPartOfArrayFormulaGroup();
Modified: poi/trunk/poi/src/main/java/org/apache/poi/ss/formula/eval/forked/ForkedEvaluator.java
URL: http://svn.apache.org/viewvc/poi/trunk/poi/src/main/java/org/apache/poi/ss/formula/eval/forked/ForkedEvaluator.java?rev=1888780&r1=1888779&r2=1888780&view=diff
==============================================================================
--- poi/trunk/poi/src/main/java/org/apache/poi/ss/formula/eval/forked/ForkedEvaluator.java (original)
+++ poi/trunk/poi/src/main/java/org/apache/poi/ss/formula/eval/forked/ForkedEvaluator.java Wed Apr 14 22:53:33 2021
@@ -52,14 +52,14 @@ public final class ForkedEvaluator {
}
/**
- * @param udfFinder pass <code>null</code> for default (AnalysisToolPak only)
+ * @param udfFinder pass {@code null} for default (AnalysisToolPak only)
*/
public static ForkedEvaluator create(Workbook wb, IStabilityClassifier stabilityClassifier, UDFFinder udfFinder) {
return new ForkedEvaluator(wb.createEvaluationWorkbook(), stabilityClassifier, udfFinder);
}
/**
- * Sets the specified cell to the supplied <tt>value</tt>
+ * Sets the specified cell to the supplied {@code value}
* @param sheetName the name of the sheet containing the cell
* @param rowIndex zero based
* @param columnIndex zero based
@@ -72,8 +72,8 @@ public final class ForkedEvaluator {
}
/**
* Copies the values of all updated cells (modified by calls to {@link
- * #updateCell(String, int, int, ValueEval)}) to the supplied <tt>workbook</tt>.<br>
- * Typically, the supplied <tt>workbook</tt> is a writable copy of the 'master workbook',
+ * #updateCell(String, int, int, ValueEval)}) to the supplied {@code workbook}.<br>
+ * Typically, the supplied {@code workbook} is a writable copy of the 'master workbook',
* but at the very least it must contain sheets with the same names.
*/
public void copyUpdatedCells(Workbook workbook) {
@@ -90,7 +90,7 @@ public final class ForkedEvaluator {
* @param sheetName the name of the sheet containing the cell
* @param rowIndex zero based
* @param columnIndex zero based
- * @return <code>null</code> if the supplied cell is <code>null</code> or blank
+ * @return {@code null} if the supplied cell is {@code null} or blank
*/
public ValueEval evaluate(String sheetName, int rowIndex, int columnIndex) {
EvaluationCell cell = _sewb.getEvaluationCell(sheetName, rowIndex, columnIndex);
Modified: poi/trunk/poi/src/main/java/org/apache/poi/ss/formula/function/FunctionDataBuilder.java
URL: http://svn.apache.org/viewvc/poi/trunk/poi/src/main/java/org/apache/poi/ss/formula/function/FunctionDataBuilder.java?rev=1888780&r1=1888779&r2=1888780&view=diff
==============================================================================
--- poi/trunk/poi/src/main/java/org/apache/poi/ss/formula/function/FunctionDataBuilder.java (original)
+++ poi/trunk/poi/src/main/java/org/apache/poi/ss/formula/function/FunctionDataBuilder.java Wed Apr 14 22:53:33 2021
@@ -23,10 +23,8 @@ import java.util.Map;
import java.util.Set;
/**
- * Temporarily collects <tt>FunctionMetadata</tt> instances for creation of a
- * <tt>FunctionMetadataRegistry</tt>.
- *
- * @author Josh Micich
+ * Temporarily collects {@code FunctionMetadata} instances for creation of a
+ * {@code FunctionMetadataRegistry}.
*/
final class FunctionDataBuilder {
private int _maxFunctionIndex;
@@ -47,7 +45,7 @@ final class FunctionDataBuilder {
FunctionMetadata fm = new FunctionMetadata(functionIndex, functionName, minParams, maxParams,
returnClassCode, parameterClassCodes);
- Integer indexKey = Integer.valueOf(functionIndex);
+ Integer indexKey = functionIndex;
if(functionIndex > _maxFunctionIndex) {
@@ -60,7 +58,7 @@ final class FunctionDataBuilder {
if(!hasFootnote || !_mutatingFunctionIndexes.contains(indexKey)) {
throw new RuntimeException("Multiple entries for function name '" + functionName + "'");
}
- _functionDataByIndex.remove(Integer.valueOf(prevFM.getIndex()));
+ _functionDataByIndex.remove(prevFM.getIndex());
}
prevFM = _functionDataByIndex.get(indexKey);
if(prevFM != null) {
Modified: poi/trunk/poi/src/main/java/org/apache/poi/ss/formula/function/FunctionMetadata.java
URL: http://svn.apache.org/viewvc/poi/trunk/poi/src/main/java/org/apache/poi/ss/formula/function/FunctionMetadata.java?rev=1888780&r1=1888779&r2=1888780&view=diff
==============================================================================
--- poi/trunk/poi/src/main/java/org/apache/poi/ss/formula/function/FunctionMetadata.java (original)
+++ poi/trunk/poi/src/main/java/org/apache/poi/ss/formula/function/FunctionMetadata.java Wed Apr 14 22:53:33 2021
@@ -19,8 +19,6 @@ package org.apache.poi.ss.formula.functi
/**
* Holds information about Excel built-in functions.
- *
- * @author Josh Micich
*/
public final class FunctionMetadata {
/**
@@ -80,7 +78,7 @@ public final class FunctionMetadata {
}
/**
- * Some varags functions (like VLOOKUP) have a specific limit to the number of arguments that
+ * Some varags functions (like VLOOKUP) have a specific limit to the number of arguments that
* can be passed. Other functions (like SUM) don't have such a limit. For those functions,
* the spreadsheet version determines the maximum number of arguments that can be passed.
* @return <code>true</code> if this function can the maximum number of arguments allowable by
Modified: poi/trunk/poi/src/main/java/org/apache/poi/ss/formula/function/FunctionMetadataReader.java
URL: http://svn.apache.org/viewvc/poi/trunk/poi/src/main/java/org/apache/poi/ss/formula/function/FunctionMetadataReader.java?rev=1888780&r1=1888779&r2=1888780&view=diff
==============================================================================
--- poi/trunk/poi/src/main/java/org/apache/poi/ss/formula/function/FunctionMetadataReader.java (original)
+++ poi/trunk/poi/src/main/java/org/apache/poi/ss/formula/function/FunctionMetadataReader.java Wed Apr 14 22:53:33 2021
@@ -31,9 +31,7 @@ import org.apache.poi.ss.formula.ptg.Ptg
import org.apache.poi.util.IOUtils;
/**
- * Converts the text meta-data file into a <tt>FunctionMetadataRegistry</tt>
- *
- * @author Josh Micich
+ * Converts the text meta-data file into a {@code FunctionMetadataRegistry}
*/
final class FunctionMetadataReader {
@@ -150,12 +148,7 @@ final class FunctionMetadataReader {
}
private static boolean isDash(String codes) {
- if(codes.length() == 1) {
- if (codes.charAt(0) == '-') {
- return true;
- }
- }
- return false;
+ return codes.length() == 1 && codes.charAt(0) == '-';
}
private static byte parseOperandTypeCode(String code) {
Modified: poi/trunk/poi/src/main/java/org/apache/poi/ss/formula/function/FunctionMetadataRegistry.java
URL: http://svn.apache.org/viewvc/poi/trunk/poi/src/main/java/org/apache/poi/ss/formula/function/FunctionMetadataRegistry.java?rev=1888780&r1=1888779&r2=1888780&view=diff
==============================================================================
--- poi/trunk/poi/src/main/java/org/apache/poi/ss/formula/function/FunctionMetadataRegistry.java (original)
+++ poi/trunk/poi/src/main/java/org/apache/poi/ss/formula/function/FunctionMetadataRegistry.java Wed Apr 14 22:53:33 2021
@@ -19,10 +19,9 @@ package org.apache.poi.ss.formula.functi
import java.util.Map;
import java.util.Set;
+
/**
* Allows clients to get {@link FunctionMetadata} instances for any built-in function of Excel.
- *
- * @author Josh Micich
*/
public final class FunctionMetadataRegistry {
/**
Modified: poi/trunk/poi/src/main/java/org/apache/poi/ss/formula/functions/Address.java
URL: http://svn.apache.org/viewvc/poi/trunk/poi/src/main/java/org/apache/poi/ss/formula/functions/Address.java?rev=1888780&r1=1888779&r2=1888780&view=diff
==============================================================================
--- poi/trunk/poi/src/main/java/org/apache/poi/ss/formula/functions/Address.java (original)
+++ poi/trunk/poi/src/main/java/org/apache/poi/ss/formula/functions/Address.java Wed Apr 14 22:53:33 2021
@@ -22,8 +22,6 @@ import org.apache.poi.ss.util.CellRefere
/**
* Creates a text reference as text, given specified row and column numbers.
- *
- * @author Aniket Banerjee (banerjee@google.com)
*/
public class Address implements Function {
public static final int REF_ABSOLUTE = 1;
Modified: poi/trunk/poi/src/main/java/org/apache/poi/ss/formula/functions/AggregateFunction.java
URL: http://svn.apache.org/viewvc/poi/trunk/poi/src/main/java/org/apache/poi/ss/formula/functions/AggregateFunction.java?rev=1888780&r1=1888779&r2=1888780&view=diff
==============================================================================
--- poi/trunk/poi/src/main/java/org/apache/poi/ss/formula/functions/AggregateFunction.java (original)
+++ poi/trunk/poi/src/main/java/org/apache/poi/ss/formula/functions/AggregateFunction.java Wed Apr 14 22:53:33 2021
@@ -24,9 +24,6 @@ import org.apache.poi.ss.formula.eval.Nu
import org.apache.poi.ss.formula.eval.OperandResolver;
import org.apache.poi.ss.formula.eval.ValueEval;
-/**
- * @author Amol S. Deshmukh < amolweb at ya hoo dot com >
- */
public abstract class AggregateFunction extends MultiOperandNumericFunction {
private static final class LargeSmall extends Fixed2ArgFunction {
Modified: poi/trunk/poi/src/main/java/org/apache/poi/ss/formula/functions/Areas.java
URL: http://svn.apache.org/viewvc/poi/trunk/poi/src/main/java/org/apache/poi/ss/formula/functions/Areas.java?rev=1888780&r1=1888779&r2=1888780&view=diff
==============================================================================
--- poi/trunk/poi/src/main/java/org/apache/poi/ss/formula/functions/Areas.java (original)
+++ poi/trunk/poi/src/main/java/org/apache/poi/ss/formula/functions/Areas.java Wed Apr 14 22:53:33 2021
@@ -25,8 +25,6 @@ import org.apache.poi.ss.formula.ptg.Num
/**
* Returns the number of areas in a reference. An area is a range of contiguous cells or a single cell.
- *
- * @author Loopbing (loopbing@gmail.com)
*/
public final class Areas implements Function {
Modified: poi/trunk/poi/src/main/java/org/apache/poi/ss/formula/functions/ArrayFunction.java
URL: http://svn.apache.org/viewvc/poi/trunk/poi/src/main/java/org/apache/poi/ss/formula/functions/ArrayFunction.java?rev=1888780&r1=1888779&r2=1888780&view=diff
==============================================================================
--- poi/trunk/poi/src/main/java/org/apache/poi/ss/formula/functions/ArrayFunction.java (original)
+++ poi/trunk/poi/src/main/java/org/apache/poi/ss/formula/functions/ArrayFunction.java Wed Apr 14 22:53:33 2021
@@ -24,7 +24,6 @@ import org.apache.poi.ss.formula.eval.*;
import java.util.function.BiFunction;
/**
- * @author Robert Hulbert
* Common Interface for any excel built-in function that has implemented array formula functionality.
*/
Modified: poi/trunk/poi/src/main/java/org/apache/poi/ss/formula/functions/Bin2Dec.java
URL: http://svn.apache.org/viewvc/poi/trunk/poi/src/main/java/org/apache/poi/ss/formula/functions/Bin2Dec.java?rev=1888780&r1=1888779&r2=1888780&view=diff
==============================================================================
--- poi/trunk/poi/src/main/java/org/apache/poi/ss/formula/functions/Bin2Dec.java (original)
+++ poi/trunk/poi/src/main/java/org/apache/poi/ss/formula/functions/Bin2Dec.java Wed Apr 14 22:53:33 2021
@@ -37,8 +37,6 @@ import org.apache.poi.ss.formula.eval.Va
* Remark
* If number is not a valid binary number, or if number contains more than 10 characters (10 bits),
* BIN2DEC returns the #NUM! error value.
- *
- * @author cedric dot walter @ gmail dot com
*/
public class Bin2Dec extends Fixed1ArgFunction implements FreeRefFunction {
@@ -80,10 +78,10 @@ public class Bin2Dec extends Fixed1ArgFu
String inverted = toggleBits(unsigned);
// Calculate decimal number
int sum = getDecimalValue(inverted);
-
+
//Add 1 to obtained number
sum++;
-
+
value = "-" + sum;
}
} catch (NumberFormatException e) {
Modified: poi/trunk/poi/src/main/java/org/apache/poi/ss/formula/functions/CalendarFieldFunction.java
URL: http://svn.apache.org/viewvc/poi/trunk/poi/src/main/java/org/apache/poi/ss/formula/functions/CalendarFieldFunction.java?rev=1888780&r1=1888779&r2=1888780&view=diff
==============================================================================
--- poi/trunk/poi/src/main/java/org/apache/poi/ss/formula/functions/CalendarFieldFunction.java (original)
+++ poi/trunk/poi/src/main/java/org/apache/poi/ss/formula/functions/CalendarFieldFunction.java Wed Apr 14 22:53:33 2021
@@ -30,9 +30,6 @@ import org.apache.poi.ss.usermodel.DateU
* Implementation of Excel functions Date parsing functions:
* Date - DAY, MONTH and YEAR
* Time - HOUR, MINUTE and SECOND
- *
- * @author Others (not mentioned in code)
- * @author Thies Wellpott
*/
public final class CalendarFieldFunction extends Fixed1ArgFunction {
public static final Function YEAR = new CalendarFieldFunction(Calendar.YEAR);
@@ -79,12 +76,12 @@ public final class CalendarFieldFunction
// rounding issues); use UTC here to prevent daylight saving issues for HOUR
Calendar c = DateUtil.getJavaCalendarUTC(serialDate + 0.4995 / DateUtil.SECONDS_PER_DAY, false);
int result = c.get(_dateFieldId);
-
+
// Month is a special case due to C semantics
if (_dateFieldId == Calendar.MONTH) {
result++;
}
-
+
return result;
}
}
Modified: poi/trunk/poi/src/main/java/org/apache/poi/ss/formula/functions/Choose.java
URL: http://svn.apache.org/viewvc/poi/trunk/poi/src/main/java/org/apache/poi/ss/formula/functions/Choose.java?rev=1888780&r1=1888779&r2=1888780&view=diff
==============================================================================
--- poi/trunk/poi/src/main/java/org/apache/poi/ss/formula/functions/Choose.java (original)
+++ poi/trunk/poi/src/main/java/org/apache/poi/ss/formula/functions/Choose.java Wed Apr 14 22:53:33 2021
@@ -24,9 +24,6 @@ import org.apache.poi.ss.formula.eval.Mi
import org.apache.poi.ss.formula.eval.OperandResolver;
import org.apache.poi.ss.formula.eval.ValueEval;
-/**
- * @author Josh Micich
- */
public final class Choose implements Function {
public ValueEval evaluate(ValueEval[] args, int srcRowIndex, int srcColumnIndex) {
Modified: poi/trunk/poi/src/main/java/org/apache/poi/ss/formula/functions/Code.java
URL: http://svn.apache.org/viewvc/poi/trunk/poi/src/main/java/org/apache/poi/ss/formula/functions/Code.java?rev=1888780&r1=1888779&r2=1888780&view=diff
==============================================================================
--- poi/trunk/poi/src/main/java/org/apache/poi/ss/formula/functions/Code.java (original)
+++ poi/trunk/poi/src/main/java/org/apache/poi/ss/formula/functions/Code.java Wed Apr 14 22:53:33 2021
@@ -27,8 +27,6 @@ import org.apache.poi.ss.formula.eval.*;
* Returns a numeric code for the first character in a text string. The returned code corresponds to the character set used by your computer.
* <p>
* text The text for which you want the code of the first character.
- *
- * @author cedric dot walter @ gmail dot com
*/
public class Code extends Fixed1ArgFunction {
Modified: poi/trunk/poi/src/main/java/org/apache/poi/ss/formula/functions/Columns.java
URL: http://svn.apache.org/viewvc/poi/trunk/poi/src/main/java/org/apache/poi/ss/formula/functions/Columns.java?rev=1888780&r1=1888779&r2=1888780&view=diff
==============================================================================
--- poi/trunk/poi/src/main/java/org/apache/poi/ss/formula/functions/Columns.java (original)
+++ poi/trunk/poi/src/main/java/org/apache/poi/ss/formula/functions/Columns.java Wed Apr 14 22:53:33 2021
@@ -25,8 +25,6 @@ import org.apache.poi.ss.formula.TwoDEva
/**
* Implementation for Excel COLUMNS function.
- *
- * @author Josh Micich
*/
public final class Columns extends Fixed1ArgFunction {
Modified: poi/trunk/poi/src/main/java/org/apache/poi/ss/formula/functions/Complex.java
URL: http://svn.apache.org/viewvc/poi/trunk/poi/src/main/java/org/apache/poi/ss/formula/functions/Complex.java?rev=1888780&r1=1888779&r2=1888780&view=diff
==============================================================================
--- poi/trunk/poi/src/main/java/org/apache/poi/ss/formula/functions/Complex.java (original)
+++ poi/trunk/poi/src/main/java/org/apache/poi/ss/formula/functions/Complex.java Wed Apr 14 22:53:33 2021
@@ -51,8 +51,6 @@ import org.apache.poi.ss.formula.eval.Va
* <li>If omitted, suffix is assumed to be "i".</li>
* <li>If suffix is neither "i" nor "j", COMPLEX returns the #VALUE! error value.</li>
* </ul>
- *
- * @author cedric dot walter @ gmail dot com
*/
public class Complex extends Var2or3ArgFunction implements FreeRefFunction {
@@ -96,7 +94,7 @@ public class Complex extends Var2or3ArgF
if (suffixValue.length() == 0) {
suffixValue = DEFAULT_SUFFIX;
}
- if (suffixValue.equals(DEFAULT_SUFFIX.toUpperCase(Locale.ROOT)) ||
+ if (suffixValue.equals(DEFAULT_SUFFIX.toUpperCase(Locale.ROOT)) ||
suffixValue.equals(SUPPORTED_SUFFIX.toUpperCase(Locale.ROOT))) {
return ErrorEval.VALUE_INVALID;
}
Modified: poi/trunk/poi/src/main/java/org/apache/poi/ss/formula/functions/CountUtils.java
URL: http://svn.apache.org/viewvc/poi/trunk/poi/src/main/java/org/apache/poi/ss/formula/functions/CountUtils.java?rev=1888780&r1=1888779&r2=1888780&view=diff
==============================================================================
--- poi/trunk/poi/src/main/java/org/apache/poi/ss/formula/functions/CountUtils.java (original)
+++ poi/trunk/poi/src/main/java/org/apache/poi/ss/formula/functions/CountUtils.java Wed Apr 14 22:53:33 2021
@@ -24,8 +24,6 @@ import org.apache.poi.ss.formula.eval.Va
/**
* Common logic for COUNT, COUNTA and COUNTIF
- *
- * @author Josh Micich
*/
final class CountUtils {
@@ -57,12 +55,12 @@ final class CountUtils {
for (int rrIx=0; rrIx<height; rrIx++) {
for (int rcIx=0; rcIx<width; rcIx++) {
ValueEval ve = areaEval.getValue(sIx, rrIx, rcIx);
-
+
if(criteriaPredicate instanceof I_MatchAreaPredicate){
I_MatchAreaPredicate areaPredicate = (I_MatchAreaPredicate)criteriaPredicate;
if(!areaPredicate.matches(areaEval, rrIx, rcIx)) continue;
}
-
+
if(criteriaPredicate.matches(ve)) {
result++;
}
@@ -76,7 +74,7 @@ final class CountUtils {
*/
public static int countMatchingCellsInRef(RefEval refEval, I_MatchPredicate criteriaPredicate) {
int result = 0;
-
+
final int firstSheetIndex = refEval.getFirstSheetIndex();
final int lastSheetIndex = refEval.getLastSheetIndex();
for (int sIx = firstSheetIndex; sIx <= lastSheetIndex; sIx++) {
Modified: poi/trunk/poi/src/main/java/org/apache/poi/ss/formula/functions/Counta.java
URL: http://svn.apache.org/viewvc/poi/trunk/poi/src/main/java/org/apache/poi/ss/formula/functions/Counta.java?rev=1888780&r1=1888779&r2=1888780&view=diff
==============================================================================
--- poi/trunk/poi/src/main/java/org/apache/poi/ss/formula/functions/Counta.java (original)
+++ poi/trunk/poi/src/main/java/org/apache/poi/ss/formula/functions/Counta.java Wed Apr 14 22:53:33 2021
@@ -31,8 +31,6 @@ import org.apache.poi.ss.formula.functio
* Excel Syntax
* COUNTA(value1,value2,...)
* Value1, value2, ... are 1 to 30 arguments representing the values or ranges to be counted.
- *
- * @author Josh Micich
*/
public final class Counta implements Function {
private final I_MatchPredicate _predicate;
@@ -98,7 +96,7 @@ public final class Counta implements Fun
public boolean matches(ValueEval valueEval) {
return defaultPredicate.matches(valueEval);
}
-
+
/**
* don't count cells in rows that are hidden or subtotal cells
*/
@@ -106,7 +104,7 @@ public final class Counta implements Fun
return !areEval.isSubTotal(rowIndex, columnIndex) && ! areEval.isRowHidden(rowIndex);
}
};
-
+
public static Counta subtotalInstance(boolean includeHiddenRows) {
return new Counta(includeHiddenRows ? subtotalPredicate : subtotalVisibleOnlyPredicate);
}
Modified: poi/trunk/poi/src/main/java/org/apache/poi/ss/formula/functions/Countblank.java
URL: http://svn.apache.org/viewvc/poi/trunk/poi/src/main/java/org/apache/poi/ss/formula/functions/Countblank.java?rev=1888780&r1=1888779&r2=1888780&view=diff
==============================================================================
--- poi/trunk/poi/src/main/java/org/apache/poi/ss/formula/functions/Countblank.java (original)
+++ poi/trunk/poi/src/main/java/org/apache/poi/ss/formula/functions/Countblank.java Wed Apr 14 22:53:33 2021
@@ -29,8 +29,6 @@ import org.apache.poi.ss.formula.functio
* <tr><th>range </th><td>is the range of cells to count blanks</td></tr>
* </table>
* </p>
- *
- * @author Mads Mohr Christensen
*/
public final class Countblank extends Fixed1ArgFunction {
Modified: poi/trunk/poi/src/main/java/org/apache/poi/ss/formula/functions/DateValue.java
URL: http://svn.apache.org/viewvc/poi/trunk/poi/src/main/java/org/apache/poi/ss/formula/functions/DateValue.java?rev=1888780&r1=1888779&r2=1888780&view=diff
==============================================================================
--- poi/trunk/poi/src/main/java/org/apache/poi/ss/formula/functions/DateValue.java (original)
+++ poi/trunk/poi/src/main/java/org/apache/poi/ss/formula/functions/DateValue.java Wed Apr 14 22:53:33 2021
@@ -41,8 +41,6 @@ import org.apache.poi.ss.usermodel.DateU
* <p>
* To view a date serial number as a date, you must apply a date format to the cell. Find links to more
* information about displaying numbers as dates in the See Also section.
- *
- * @author Milosz Rembisz
*/
public class DateValue extends Fixed1ArgFunction {
Modified: poi/trunk/poi/src/main/java/org/apache/poi/ss/formula/functions/Dec2Bin.java
URL: http://svn.apache.org/viewvc/poi/trunk/poi/src/main/java/org/apache/poi/ss/formula/functions/Dec2Bin.java?rev=1888780&r1=1888779&r2=1888780&view=diff
==============================================================================
--- poi/trunk/poi/src/main/java/org/apache/poi/ss/formula/functions/Dec2Bin.java (original)
+++ poi/trunk/poi/src/main/java/org/apache/poi/ss/formula/functions/Dec2Bin.java Wed Apr 14 22:53:33 2021
@@ -45,8 +45,6 @@ import org.apache.poi.ss.formula.eval.Va
* <li>If places is nonnumeric, DEC2BIN returns the #VALUE! error value.</li>
* <li>If places is zero or negative, DEC2BIN returns the #NUM! error value.</li>
* </ul>
- *
- * @author cedric dot walter @ gmail dot com
*/
public class Dec2Bin extends Var1or2ArgFunction implements FreeRefFunction {
Modified: poi/trunk/poi/src/main/java/org/apache/poi/ss/formula/functions/Delta.java
URL: http://svn.apache.org/viewvc/poi/trunk/poi/src/main/java/org/apache/poi/ss/formula/functions/Delta.java?rev=1888780&r1=1888779&r2=1888780&view=diff
==============================================================================
--- poi/trunk/poi/src/main/java/org/apache/poi/ss/formula/functions/Delta.java (original)
+++ poi/trunk/poi/src/main/java/org/apache/poi/ss/formula/functions/Delta.java Wed Apr 14 22:53:33 2021
@@ -37,8 +37,6 @@ import org.apache.poi.ss.formula.eval.Va
* <li>If number1 is nonnumeric, DELTA returns the #VALUE! error value.</li>
* <li>If number2 is nonnumeric, DELTA returns the #VALUE! error value.</li>
* </ul>
- *
- * @author cedric dot walter @ gmail dot com
*/
public final class Delta extends Fixed2ArgFunction implements FreeRefFunction {
Modified: poi/trunk/poi/src/main/java/org/apache/poi/ss/formula/functions/Errortype.java
URL: http://svn.apache.org/viewvc/poi/trunk/poi/src/main/java/org/apache/poi/ss/formula/functions/Errortype.java?rev=1888780&r1=1888779&r2=1888780&view=diff
==============================================================================
--- poi/trunk/poi/src/main/java/org/apache/poi/ss/formula/functions/Errortype.java (original)
+++ poi/trunk/poi/src/main/java/org/apache/poi/ss/formula/functions/Errortype.java Wed Apr 14 22:53:33 2021
@@ -30,8 +30,7 @@ import org.apache.poi.ss.usermodel.Formu
* <b>Syntax:</b><br>
* <b>ERROR.TYPE</b>(<b>errorValue</b>)</p>
* <p>
- * Returns a number corresponding to the error type of the supplied argument.<p>
- * <p>
+ * Returns a number corresponding to the error type of the supplied argument.
* <table border="1" cellpadding="1" cellspacing="1" summary="Return values for ERROR.TYPE()">
* <tr><td>errorValue</td><td>Return Value</td></tr>
* <tr><td>#NULL!</td><td>1</td></tr>
@@ -45,13 +44,11 @@ import org.apache.poi.ss.usermodel.Formu
* </table>
*
* Note - the results of ERROR.TYPE() are different to the constants defined in
- * <tt>ErrorConstants</tt>.
- * </p>
- *
- * @author Josh Micich
+ * {@code ErrorConstants}.
*/
public final class Errortype extends Fixed1ArgFunction {
+ @Override
public ValueEval evaluate(int srcRowIndex, int srcColumnIndex, ValueEval arg0) {
try {
Modified: poi/trunk/poi/src/main/java/org/apache/poi/ss/formula/functions/FactDouble.java
URL: http://svn.apache.org/viewvc/poi/trunk/poi/src/main/java/org/apache/poi/ss/formula/functions/FactDouble.java?rev=1888780&r1=1888779&r2=1888780&view=diff
==============================================================================
--- poi/trunk/poi/src/main/java/org/apache/poi/ss/formula/functions/FactDouble.java (original)
+++ poi/trunk/poi/src/main/java/org/apache/poi/ss/formula/functions/FactDouble.java Wed Apr 14 22:53:33 2021
@@ -38,8 +38,6 @@ import java.util.HashMap;
* <li>If number is negative, FACTDOUBLE returns the #NUM! error value.</li>
* </ul>
* Use a cache for more speed of previously calculated factorial
- *
- * @author cedric dot walter @ gmail dot com
*/
public class FactDouble extends Fixed1ArgFunction implements FreeRefFunction {
Modified: poi/trunk/poi/src/main/java/org/apache/poi/ss/formula/functions/FinanceFunction.java
URL: http://svn.apache.org/viewvc/poi/trunk/poi/src/main/java/org/apache/poi/ss/formula/functions/FinanceFunction.java?rev=1888780&r1=1888779&r2=1888780&view=diff
==============================================================================
--- poi/trunk/poi/src/main/java/org/apache/poi/ss/formula/functions/FinanceFunction.java (original)
+++ poi/trunk/poi/src/main/java/org/apache/poi/ss/formula/functions/FinanceFunction.java Wed Apr 14 22:53:33 2021
@@ -24,9 +24,6 @@ import org.apache.poi.ss.formula.eval.Mi
import org.apache.poi.ss.formula.eval.NumberEval;
import org.apache.poi.ss.formula.eval.ValueEval;
-/**
- * @author Amol S. Deshmukh < amolweb at ya hoo dot com >
- */
public abstract class FinanceFunction implements Function3Arg, Function4Arg {
private static final ValueEval DEFAULT_ARG3 = NumberEval.ZERO;
private static final ValueEval DEFAULT_ARG4 = BoolEval.FALSE;
Modified: poi/trunk/poi/src/main/java/org/apache/poi/ss/formula/functions/FinanceLib.java
URL: http://svn.apache.org/viewvc/poi/trunk/poi/src/main/java/org/apache/poi/ss/formula/functions/FinanceLib.java?rev=1888780&r1=1888779&r2=1888780&view=diff
==============================================================================
--- poi/trunk/poi/src/main/java/org/apache/poi/ss/formula/functions/FinanceLib.java (original)
+++ poi/trunk/poi/src/main/java/org/apache/poi/ss/formula/functions/FinanceLib.java Wed Apr 14 22:53:33 2021
@@ -18,9 +18,6 @@
package org.apache.poi.ss.formula.functions;
/**
- * @author Amol S. Deshmukh < amolweb at ya hoo dot com >
- *
- *
* This class is a functon library for common fiscal functions.
* <b>Glossary of terms/abbreviations:</b>
* <br>
Modified: poi/trunk/poi/src/main/java/org/apache/poi/ss/formula/functions/Fixed1ArgFunction.java
URL: http://svn.apache.org/viewvc/poi/trunk/poi/src/main/java/org/apache/poi/ss/formula/functions/Fixed1ArgFunction.java?rev=1888780&r1=1888779&r2=1888780&view=diff
==============================================================================
--- poi/trunk/poi/src/main/java/org/apache/poi/ss/formula/functions/Fixed1ArgFunction.java (original)
+++ poi/trunk/poi/src/main/java/org/apache/poi/ss/formula/functions/Fixed1ArgFunction.java Wed Apr 14 22:53:33 2021
@@ -22,8 +22,6 @@ import org.apache.poi.ss.formula.eval.Va
/**
* Convenience base class for functions that must take exactly one argument.
- *
- * @author Josh Micich
*/
public abstract class Fixed1ArgFunction implements Function1Arg {
public final ValueEval evaluate(ValueEval[] args, int srcRowIndex, int srcColumnIndex) {
Modified: poi/trunk/poi/src/main/java/org/apache/poi/ss/formula/functions/Fixed2ArgFunction.java
URL: http://svn.apache.org/viewvc/poi/trunk/poi/src/main/java/org/apache/poi/ss/formula/functions/Fixed2ArgFunction.java?rev=1888780&r1=1888779&r2=1888780&view=diff
==============================================================================
--- poi/trunk/poi/src/main/java/org/apache/poi/ss/formula/functions/Fixed2ArgFunction.java (original)
+++ poi/trunk/poi/src/main/java/org/apache/poi/ss/formula/functions/Fixed2ArgFunction.java Wed Apr 14 22:53:33 2021
@@ -22,8 +22,6 @@ import org.apache.poi.ss.formula.eval.Va
/**
* Convenience base class for functions that must take exactly two arguments.
- *
- * @author Josh Micich
*/
public abstract class Fixed2ArgFunction implements Function2Arg {
public final ValueEval evaluate(ValueEval[] args, int srcRowIndex, int srcColumnIndex) {
Modified: poi/trunk/poi/src/main/java/org/apache/poi/ss/formula/functions/Fixed3ArgFunction.java
URL: http://svn.apache.org/viewvc/poi/trunk/poi/src/main/java/org/apache/poi/ss/formula/functions/Fixed3ArgFunction.java?rev=1888780&r1=1888779&r2=1888780&view=diff
==============================================================================
--- poi/trunk/poi/src/main/java/org/apache/poi/ss/formula/functions/Fixed3ArgFunction.java (original)
+++ poi/trunk/poi/src/main/java/org/apache/poi/ss/formula/functions/Fixed3ArgFunction.java Wed Apr 14 22:53:33 2021
@@ -22,8 +22,6 @@ import org.apache.poi.ss.formula.eval.Va
/**
* Convenience base class for functions that must take exactly three arguments.
- *
- * @author Josh Micich
*/
public abstract class Fixed3ArgFunction implements Function3Arg {
public final ValueEval evaluate(ValueEval[] args, int srcRowIndex, int srcColumnIndex) {
Modified: poi/trunk/poi/src/main/java/org/apache/poi/ss/formula/functions/Fixed4ArgFunction.java
URL: http://svn.apache.org/viewvc/poi/trunk/poi/src/main/java/org/apache/poi/ss/formula/functions/Fixed4ArgFunction.java?rev=1888780&r1=1888779&r2=1888780&view=diff
==============================================================================
--- poi/trunk/poi/src/main/java/org/apache/poi/ss/formula/functions/Fixed4ArgFunction.java (original)
+++ poi/trunk/poi/src/main/java/org/apache/poi/ss/formula/functions/Fixed4ArgFunction.java Wed Apr 14 22:53:33 2021
@@ -22,8 +22,6 @@ import org.apache.poi.ss.formula.eval.Va
/**
* Convenience base class for functions that must take exactly four arguments.
- *
- * @author Josh Micich
*/
public abstract class Fixed4ArgFunction implements Function4Arg {
public final ValueEval evaluate(ValueEval[] args, int srcRowIndex, int srcColumnIndex) {
Modified: poi/trunk/poi/src/main/java/org/apache/poi/ss/formula/functions/FreeRefFunction.java
URL: http://svn.apache.org/viewvc/poi/trunk/poi/src/main/java/org/apache/poi/ss/formula/functions/FreeRefFunction.java?rev=1888780&r1=1888779&r2=1888780&view=diff
==============================================================================
--- poi/trunk/poi/src/main/java/org/apache/poi/ss/formula/functions/FreeRefFunction.java (original)
+++ poi/trunk/poi/src/main/java/org/apache/poi/ss/formula/functions/FreeRefFunction.java Wed Apr 14 22:53:33 2021
@@ -35,16 +35,14 @@ import org.apache.poi.ss.formula.Operati
*
* For the moment this interface only exists to serve the <b>INDIRECT</b> which can decode
* arbitrary text into cell references, and evaluate them..
- *
- * @author Josh Micich
*/
public interface FreeRefFunction {
/**
- * @param args the pre-evaluated arguments for this function. args is never <code>null</code>,
+ * @param args the pre-evaluated arguments for this function. args is never {@code null},
* nor are any of its elements.
* @param ec primarily used to identify the source cell containing the formula being evaluated.
* may also be used to dynamically create reference evals.
- * @return never <code>null</code>. Possibly an instance of <tt>ErrorEval</tt> in the case of
+ * @return never {@code null}. Possibly an instance of {@code ErrorEval} in the case of
* a specified Excel error (Exceptions are never thrown to represent Excel errors).
*/
ValueEval evaluate(ValueEval[] args, OperationEvaluationContext ec);
Modified: poi/trunk/poi/src/main/java/org/apache/poi/ss/formula/functions/Frequency.java
URL: http://svn.apache.org/viewvc/poi/trunk/poi/src/main/java/org/apache/poi/ss/formula/functions/Frequency.java?rev=1888780&r1=1888779&r2=1888780&view=diff
==============================================================================
--- poi/trunk/poi/src/main/java/org/apache/poi/ss/formula/functions/Frequency.java (original)
+++ poi/trunk/poi/src/main/java/org/apache/poi/ss/formula/functions/Frequency.java Wed Apr 14 22:53:33 2021
@@ -35,8 +35,6 @@ import java.util.Arrays;
* If data_array contains no values, FREQUENCY returns an array of zeros.<br>
* <b>bins_array</b> Required. An array of or reference to intervals into which you want to group the values in data_array.
* If bins_array contains no values, FREQUENCY returns the number of elements in data_array.<br>
- *
- * @author Yegor Kozlov
*/
public class Frequency extends Fixed2ArgFunction {
public static final Function instance = new Frequency();
Modified: poi/trunk/poi/src/main/java/org/apache/poi/ss/formula/functions/Function.java
URL: http://svn.apache.org/viewvc/poi/trunk/poi/src/main/java/org/apache/poi/ss/formula/functions/Function.java?rev=1888780&r1=1888779&r2=1888780&view=diff
==============================================================================
--- poi/trunk/poi/src/main/java/org/apache/poi/ss/formula/functions/Function.java (original)
+++ poi/trunk/poi/src/main/java/org/apache/poi/ss/formula/functions/Function.java Wed Apr 14 22:53:33 2021
@@ -24,8 +24,6 @@ import org.apache.poi.ss.formula.eval.Va
/**
* Common interface for all implementations of Excel built-in functions.
- *
- * @author Amol S. Deshmukh < amolweb at ya hoo dot com >
*/
public interface Function {
Modified: poi/trunk/poi/src/main/java/org/apache/poi/ss/formula/functions/Function1Arg.java
URL: http://svn.apache.org/viewvc/poi/trunk/poi/src/main/java/org/apache/poi/ss/formula/functions/Function1Arg.java?rev=1888780&r1=1888779&r2=1888780&view=diff
==============================================================================
--- poi/trunk/poi/src/main/java/org/apache/poi/ss/formula/functions/Function1Arg.java (original)
+++ poi/trunk/poi/src/main/java/org/apache/poi/ss/formula/functions/Function1Arg.java Wed Apr 14 22:53:33 2021
@@ -21,8 +21,6 @@ import org.apache.poi.ss.formula.eval.Va
/**
* Implemented by all functions that can be called with one argument
- *
- * @author Josh Micich
*/
public interface Function1Arg extends Function {
/**
Modified: poi/trunk/poi/src/main/java/org/apache/poi/ss/formula/functions/Function2Arg.java
URL: http://svn.apache.org/viewvc/poi/trunk/poi/src/main/java/org/apache/poi/ss/formula/functions/Function2Arg.java?rev=1888780&r1=1888779&r2=1888780&view=diff
==============================================================================
--- poi/trunk/poi/src/main/java/org/apache/poi/ss/formula/functions/Function2Arg.java (original)
+++ poi/trunk/poi/src/main/java/org/apache/poi/ss/formula/functions/Function2Arg.java Wed Apr 14 22:53:33 2021
@@ -21,8 +21,6 @@ import org.apache.poi.ss.formula.eval.Va
/**
* Implemented by all functions that can be called with two arguments
- *
- * @author Josh Micich
*/
public interface Function2Arg extends Function {
/**
Modified: poi/trunk/poi/src/main/java/org/apache/poi/ss/formula/functions/Function3Arg.java
URL: http://svn.apache.org/viewvc/poi/trunk/poi/src/main/java/org/apache/poi/ss/formula/functions/Function3Arg.java?rev=1888780&r1=1888779&r2=1888780&view=diff
==============================================================================
--- poi/trunk/poi/src/main/java/org/apache/poi/ss/formula/functions/Function3Arg.java (original)
+++ poi/trunk/poi/src/main/java/org/apache/poi/ss/formula/functions/Function3Arg.java Wed Apr 14 22:53:33 2021
@@ -21,8 +21,6 @@ import org.apache.poi.ss.formula.eval.Va
/**
* Implemented by all functions that can be called with three arguments
- *
- * @author Josh Micich
*/
public interface Function3Arg extends Function {
/**
Modified: poi/trunk/poi/src/main/java/org/apache/poi/ss/formula/functions/Function4Arg.java
URL: http://svn.apache.org/viewvc/poi/trunk/poi/src/main/java/org/apache/poi/ss/formula/functions/Function4Arg.java?rev=1888780&r1=1888779&r2=1888780&view=diff
==============================================================================
--- poi/trunk/poi/src/main/java/org/apache/poi/ss/formula/functions/Function4Arg.java (original)
+++ poi/trunk/poi/src/main/java/org/apache/poi/ss/formula/functions/Function4Arg.java Wed Apr 14 22:53:33 2021
@@ -21,8 +21,6 @@ import org.apache.poi.ss.formula.eval.Va
/**
* Implemented by all functions that can be called with four arguments
- *
- * @author Josh Micich
*/
public interface Function4Arg extends Function {
/**
Modified: poi/trunk/poi/src/main/java/org/apache/poi/ss/formula/functions/Hex2Dec.java
URL: http://svn.apache.org/viewvc/poi/trunk/poi/src/main/java/org/apache/poi/ss/formula/functions/Hex2Dec.java?rev=1888780&r1=1888779&r2=1888780&view=diff
==============================================================================
--- poi/trunk/poi/src/main/java/org/apache/poi/ss/formula/functions/Hex2Dec.java (original)
+++ poi/trunk/poi/src/main/java/org/apache/poi/ss/formula/functions/Hex2Dec.java Wed Apr 14 22:53:33 2021
@@ -32,8 +32,6 @@ import org.apache.poi.ss.formula.eval.*;
* The remaining 39 bits are magnitude bits. Negative numbers are represented using two's-complement notation.
* Remark
* If number is not a valid hexadecimal number, HEX2DEC returns the #NUM! error value.
- *
- * @author cedric dot walter @ gmail dot com
*/
public class Hex2Dec extends Fixed1ArgFunction implements FreeRefFunction {
Modified: poi/trunk/poi/src/main/java/org/apache/poi/ss/formula/functions/Hlookup.java
URL: http://svn.apache.org/viewvc/poi/trunk/poi/src/main/java/org/apache/poi/ss/formula/functions/Hlookup.java?rev=1888780&r1=1888779&r2=1888780&view=diff
==============================================================================
--- poi/trunk/poi/src/main/java/org/apache/poi/ss/formula/functions/Hlookup.java (original)
+++ poi/trunk/poi/src/main/java/org/apache/poi/ss/formula/functions/Hlookup.java Wed Apr 14 22:53:33 2021
@@ -36,17 +36,17 @@ import org.apache.poi.ss.formula.TwoDEva
* <b>row_index_num</b> a 1 based index specifying which row value of the lookup data will be returned.<br>
* <b>range_lookup</b> If TRUE (default), HLOOKUP finds the largest value less than or equal to
* the lookup_value. If FALSE, only exact matches will be considered<br>
- *
- * @author Josh Micich
*/
public final class Hlookup extends Var3or4ArgFunction {
private static final ValueEval DEFAULT_ARG3 = BoolEval.TRUE;
+ @Override
public ValueEval evaluate(int srcRowIndex, int srcColumnIndex, ValueEval arg0, ValueEval arg1,
ValueEval arg2) {
return evaluate(srcRowIndex, srcColumnIndex, arg0, arg1, arg2, DEFAULT_ARG3);
}
+ @Override
public ValueEval evaluate(int srcRowIndex, int srcColumnIndex, ValueEval arg0, ValueEval arg1,
ValueEval arg2, ValueEval arg3) {
try {
@@ -65,7 +65,7 @@ public final class Hlookup extends Var3o
}
/**
- * Returns one column from an <tt>AreaEval</tt>
+ * Returns one column from an {@code AreaEval}
*
* @param rowIndex assumed to be non-negative
*
Modified: poi/trunk/poi/src/main/java/org/apache/poi/ss/formula/functions/Hyperlink.java
URL: http://svn.apache.org/viewvc/poi/trunk/poi/src/main/java/org/apache/poi/ss/formula/functions/Hyperlink.java?rev=1888780&r1=1888779&r2=1888780&view=diff
==============================================================================
--- poi/trunk/poi/src/main/java/org/apache/poi/ss/formula/functions/Hyperlink.java (original)
+++ poi/trunk/poi/src/main/java/org/apache/poi/ss/formula/functions/Hyperlink.java Wed Apr 14 22:53:33 2021
@@ -32,8 +32,6 @@ import org.apache.poi.ss.formula.eval.Va
* <b>friendly_name</b> (optional) the value to display<p>
*
* Returns last argument. Leaves type unchanged (does not convert to {@link org.apache.poi.ss.formula.eval.StringEval}).
- *
- * @author Wayne Clingingsmith
*/
public final class Hyperlink extends Var1or2ArgFunction {
Modified: poi/trunk/poi/src/main/java/org/apache/poi/ss/formula/functions/ImReal.java
URL: http://svn.apache.org/viewvc/poi/trunk/poi/src/main/java/org/apache/poi/ss/formula/functions/ImReal.java?rev=1888780&r1=1888779&r2=1888780&view=diff
==============================================================================
--- poi/trunk/poi/src/main/java/org/apache/poi/ss/formula/functions/ImReal.java (original)
+++ poi/trunk/poi/src/main/java/org/apache/poi/ss/formula/functions/ImReal.java Wed Apr 14 22:53:33 2021
@@ -40,8 +40,6 @@ import org.apache.poi.ss.formula.eval.Va
* <li>If inumber is not in the form x + yi or x + yj, this function returns the #NUM! error value.</li>
* <li>Use COMPLEX to convert real and imaginary coefficients into a complex number.</li>
* </ul>
- *
- * @author cedric dot walter @ gmail dot com
*/
public class ImReal extends Fixed1ArgFunction implements FreeRefFunction {
Modified: poi/trunk/poi/src/main/java/org/apache/poi/ss/formula/functions/Imaginary.java
URL: http://svn.apache.org/viewvc/poi/trunk/poi/src/main/java/org/apache/poi/ss/formula/functions/Imaginary.java?rev=1888780&r1=1888779&r2=1888780&view=diff
==============================================================================
--- poi/trunk/poi/src/main/java/org/apache/poi/ss/formula/functions/Imaginary.java (original)
+++ poi/trunk/poi/src/main/java/org/apache/poi/ss/formula/functions/Imaginary.java Wed Apr 14 22:53:33 2021
@@ -36,8 +36,6 @@ import java.util.regex.Pattern;
* <ul>
* <li>Use COMPLEX to convert real and imaginary coefficients into a complex number.</li>
* </ul>
- *
- * @author cedric dot walter @ gmail dot com
*/
public class Imaginary extends Fixed1ArgFunction implements FreeRefFunction {
Modified: poi/trunk/poi/src/main/java/org/apache/poi/ss/formula/functions/Index.java
URL: http://svn.apache.org/viewvc/poi/trunk/poi/src/main/java/org/apache/poi/ss/formula/functions/Index.java?rev=1888780&r1=1888779&r2=1888780&view=diff
==============================================================================
--- poi/trunk/poi/src/main/java/org/apache/poi/ss/formula/functions/Index.java (original)
+++ poi/trunk/poi/src/main/java/org/apache/poi/ss/formula/functions/Index.java Wed Apr 14 22:53:33 2021
@@ -30,8 +30,8 @@ import org.apache.poi.ss.formula.TwoDEva
* Implementation for the Excel function INDEX
* <p>
*
- * Syntax : <br>
- * INDEX ( reference, row_num[, column_num [, area_num]])</br>
+ * Syntax : <p>
+ * INDEX ( reference, row_num[, column_num [, area_num]])<p>
* INDEX ( array, row_num[, column_num])
* <table border="0" cellpadding="1" cellspacing="0" summary="Parameter descriptions">
* <tr><th>reference</th><td>typically an area reference, possibly a union of areas</td></tr>
@@ -40,9 +40,6 @@ import org.apache.poi.ss.formula.TwoDEva
* <tr><th>column_num</th><td>selects column within the array or area reference. default is 1</td></tr>
* <tr><th>area_num</th><td>used when reference is a union of areas</td></tr>
* </table>
- * </p>
- *
- * @author Josh Micich
*/
public final class Index implements Function2Arg, Function3Arg, Function4Arg, ArrayMode {
Modified: poi/trunk/poi/src/main/java/org/apache/poi/ss/formula/functions/Indirect.java
URL: http://svn.apache.org/viewvc/poi/trunk/poi/src/main/java/org/apache/poi/ss/formula/functions/Indirect.java?rev=1888780&r1=1888779&r2=1888780&view=diff
==============================================================================
--- poi/trunk/poi/src/main/java/org/apache/poi/ss/formula/functions/Indirect.java (original)
+++ poi/trunk/poi/src/main/java/org/apache/poi/ss/formula/functions/Indirect.java Wed Apr 14 22:53:33 2021
@@ -42,8 +42,6 @@ import org.apache.poi.ss.usermodel.Table
* normally be written in a cell formula.<br>
* <b>isA1Style</b> (default TRUE) specifies whether the ref_text should be
* interpreted as A1-style or R1C1-style.
- *
- * @author Josh Micich
*/
public final class Indirect implements FreeRefFunction {
@@ -95,7 +93,7 @@ public final class Indirect implements F
private static ValueEval evaluateIndirect(final OperationEvaluationContext ec, String text,
boolean isA1style) {
-
+
// Search backwards for '!' because sheet names can contain '!'
int plingPos = text.lastIndexOf('!');
@@ -132,7 +130,7 @@ public final class Indirect implements F
int colonPos = refText.indexOf(':');
if (colonPos < 0) {
refStrPart1 = refText.trim();
- refStrPart2 = null;
+ refStrPart2 = null;
} else {
refStrPart1 = refText.substring(0, colonPos).trim();
refStrPart2 = refText.substring(colonPos + 1).trim();
Modified: poi/trunk/poi/src/main/java/org/apache/poi/ss/formula/functions/Intercept.java
URL: http://svn.apache.org/viewvc/poi/trunk/poi/src/main/java/org/apache/poi/ss/formula/functions/Intercept.java?rev=1888780&r1=1888779&r2=1888780&view=diff
==============================================================================
--- poi/trunk/poi/src/main/java/org/apache/poi/ss/formula/functions/Intercept.java (original)
+++ poi/trunk/poi/src/main/java/org/apache/poi/ss/formula/functions/Intercept.java Wed Apr 14 22:53:33 2021
@@ -29,9 +29,6 @@ import org.apache.poi.ss.formula.functio
* (http://introcs.cs.princeton.edu/java/97data/LinearRegression.java.html)
* <b>Syntax</b>:<br>
* <b>INTERCEPT</b>(<b>arrayX</b>, <b>arrayY</b>)<p>
- *
- *
- * @author Johan Karlsteen
*/
public final class Intercept extends Fixed2ArgFunction {
@@ -39,7 +36,7 @@ public final class Intercept extends Fix
public Intercept() {
func = new LinearRegressionFunction(FUNCTION.INTERCEPT);
}
-
+
public ValueEval evaluate(int srcRowIndex, int srcColumnIndex,
ValueEval arg0, ValueEval arg1) {
return func.evaluate(srcRowIndex, srcColumnIndex, arg0, arg1);
Modified: poi/trunk/poi/src/main/java/org/apache/poi/ss/formula/functions/LinearRegressionFunction.java
URL: http://svn.apache.org/viewvc/poi/trunk/poi/src/main/java/org/apache/poi/ss/formula/functions/LinearRegressionFunction.java?rev=1888780&r1=1888779&r2=1888780&view=diff
==============================================================================
--- poi/trunk/poi/src/main/java/org/apache/poi/ss/formula/functions/LinearRegressionFunction.java (original)
+++ poi/trunk/poi/src/main/java/org/apache/poi/ss/formula/functions/LinearRegressionFunction.java Wed Apr 14 22:53:33 2021
@@ -35,10 +35,7 @@ import org.apache.poi.ss.formula.functio
* <b>Syntax</b>:<br>
* <b>INTERCEPT</b>(<b>arrayX</b>, <b>arrayY</b>)<p>
* or
- * <b>SLOPE</b>(<b>arrayX</b>, <b>arrayY</b>)<p>
- *
- *
- * @author Johan Karlsteen
+ * <b>SLOPE</b>(<b>arrayX</b>, <b>arrayY</b>)
*/
public final class LinearRegressionFunction extends Fixed2ArgFunction {
@@ -48,7 +45,8 @@ public final class LinearRegressionFunct
_size = size;
}
- public ValueEval getItem(int index) {
+ @Override
+ public ValueEval getItem(int index) {
if (index < 0 || index > _size) {
throw new IllegalArgumentException("Specified index " + index
+ " is outside range (0.." + (_size - 1) + ")");
Modified: poi/trunk/poi/src/main/java/org/apache/poi/ss/formula/functions/LogicalFunction.java
URL: http://svn.apache.org/viewvc/poi/trunk/poi/src/main/java/org/apache/poi/ss/formula/functions/LogicalFunction.java?rev=1888780&r1=1888779&r2=1888780&view=diff
==============================================================================
--- poi/trunk/poi/src/main/java/org/apache/poi/ss/formula/functions/LogicalFunction.java (original)
+++ poi/trunk/poi/src/main/java/org/apache/poi/ss/formula/functions/LogicalFunction.java Wed Apr 14 22:53:33 2021
@@ -25,7 +25,8 @@ import org.apache.poi.ss.formula.eval.*;
*/
public abstract class LogicalFunction extends Fixed1ArgFunction implements ArrayFunction{
- @SuppressWarnings("unused")
+ @Override
+ @SuppressWarnings("unused")
public ValueEval evaluate(int srcRowIndex, int srcColumnIndex, ValueEval arg0) {
ValueEval ve;
try {
@@ -58,21 +59,25 @@ public abstract class LogicalFunction ex
protected abstract boolean evaluate(ValueEval arg);
public static final Function ISLOGICAL = new LogicalFunction() {
+ @Override
protected boolean evaluate(ValueEval arg) {
return arg instanceof BoolEval;
}
};
public static final Function ISNONTEXT = new LogicalFunction() {
+ @Override
protected boolean evaluate(ValueEval arg) {
return !(arg instanceof StringEval);
}
};
public static final Function ISNUMBER = new LogicalFunction() {
+ @Override
protected boolean evaluate(ValueEval arg) {
return arg instanceof NumberEval;
}
};
public static final Function ISTEXT = new LogicalFunction() {
+ @Override
protected boolean evaluate(ValueEval arg) {
return arg instanceof StringEval;
}
@@ -80,6 +85,7 @@ public abstract class LogicalFunction ex
public static final Function ISBLANK = new LogicalFunction() {
+ @Override
protected boolean evaluate(ValueEval arg) {
return arg instanceof BlankEval;
}
@@ -87,21 +93,22 @@ public abstract class LogicalFunction ex
public static final Function ISERROR = new LogicalFunction() {
+ @Override
protected boolean evaluate(ValueEval arg) {
return arg instanceof ErrorEval;
}
};
/**
- * Implementation of Excel <tt>ISERR()</tt> function.<p>
+ * Implementation of Excel {@code ISERR()} function.<p>
*
* <b>Syntax</b>:<br>
* <b>ISERR</b>(<b>value</b>)<p>
*
* <b>value</b> The value to be tested<p>
*
- * Returns the logical value <tt>TRUE</tt> if value refers to any error value except
- * <tt>'#N/A'</tt>; otherwise, it returns <tt>FALSE</tt>.
+ * Returns the logical value {@code TRUE} if value refers to any error value except
+ * {@code '#N/A'}; otherwise, it returns {@code FALSE}.
*/
public static final Function ISERR = new LogicalFunction() {
@Override
@@ -121,10 +128,11 @@ public abstract class LogicalFunction ex
*
* <b>value</b> The value to be tested<br>
* <br>
- * Returns <tt>TRUE</tt> if the specified value is '#N/A', <tt>FALSE</tt> otherwise.
+ * Returns {@code TRUE} if the specified value is '#N/A', {@code FALSE} otherwise.
*/
public static final Function ISNA = new LogicalFunction() {
+ @Override
protected boolean evaluate(ValueEval arg) {
return arg == ErrorEval.NA;
}
@@ -132,6 +140,7 @@ public abstract class LogicalFunction ex
public static final Function ISREF = new Fixed1ArgFunction() {
+ @Override
public ValueEval evaluate(int srcRowIndex, int srcColumnIndex, ValueEval arg0) {
if (arg0 instanceof RefEval || arg0 instanceof AreaEval || arg0 instanceof RefListEval) {
return BoolEval.TRUE;
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@poi.apache.org
For additional commands, e-mail: commits-help@poi.apache.org