If the components parameter is null or has zero length, - * the POIFSDocumentPath is appropriate for a document that is in the root of a POIFSFileSystem + * every Nth (for N > 1) string thereafter must be the name of a directory in the directory + * identified by the (N-1)th string.
+ * If the components parameter is null or has zero length, the POIFSDocumentPath is appropriate
+ * for a document that is in the root of a POIFSFileSystem
*
* @exception IllegalArgumentException
* if any of the elements in the components parameter are null or have zero length
@@ -133,7 +134,7 @@ public class POIFSDocumentPath {
*
* @return the nth component;
*
- * @exception ArrayIndexOutOfBoundsException if n < 0 or n >= length()
+ * @exception ArrayIndexOutOfBoundsException if n < 0 or n >= length()
*/
public String getComponent(int n) throws ArrayIndexOutOfBoundsException {
return components[ n ];
diff --git a/poi/src/main/java/org/apache/poi/poifs/property/DirectoryProperty.java b/poi/src/main/java/org/apache/poi/poifs/property/DirectoryProperty.java
index 07846736c2..badb306cba 100644
--- a/poi/src/main/java/org/apache/poi/poifs/property/DirectoryProperty.java
+++ b/poi/src/main/java/org/apache/poi/poifs/property/DirectoryProperty.java
@@ -33,10 +33,10 @@ import java.util.Set;
public class DirectoryProperty extends Property implements Parent, Iterable
- * If linespacing >= 0, then linespacing is a percentage of normal line height.
- * If linespacing < 0, the absolute value of linespacing is the spacing in points
+ * If linespacing >= 0, then linespacing is a percentage of normal line height.
+ * If linespacing < 0, the absolute value of linespacing is the spacing in points
*
* Each format part can contain a color, a condition, and will always contain a
- * format specification. For example "[Red][>=10]#" has a color
- * ([Red]), a condition (>=10) and a format specification
- * (#).
+ * format specification. For example {@code "[Red][>=10]#"} has a color
+ * ({@code [Red]}), a condition ({@code >=10}) and a format specification
+ * ({@code #}).
*
* This class also contains patterns for matching the subparts of format
* specification. These are used internally, but are made public in case other
* code has use for them.
- *
- * @author Ken Arnold, Industrious Media LLC
*/
public class CellFormatPart {
private static final Logger LOG = Logger.getLogger(CellFormat.class.getName());
diff --git a/poi/src/main/java/org/apache/poi/ss/format/SimpleFraction.java b/poi/src/main/java/org/apache/poi/ss/format/SimpleFraction.java
index dec5a275f3..e56430cc5c 100644
--- a/poi/src/main/java/org/apache/poi/ss/format/SimpleFraction.java
+++ b/poi/src/main/java/org/apache/poi/ss/format/SimpleFraction.java
@@ -26,7 +26,7 @@ public class SimpleFraction {
private final int numerator;
/**
* Create a fraction given a double value and a denominator.
- *
+ *
* @param val double value of fraction
* @param exactDenom the exact denominator
* @return a SimpleFraction with the given values set.
@@ -35,17 +35,17 @@ public class SimpleFraction {
int num = (int)Math.round(val*exactDenom);
return new SimpleFraction(num,exactDenom);
}
-
+
/**
* Create a fraction given the double value and either the maximum error
* allowed or the maximum number of denominator digits.
*
* @param value the double value to convert to a fraction.
* @param maxDenominator maximum denominator value allowed.
- *
+ *
* @throws RuntimeException if the continued fraction failed to
* converge.
- * @throws IllegalArgumentException if value > Integer.MAX_VALUE
+ * @throws IllegalArgumentException if value > Integer.MAX_VALUE
*/
public static SimpleFraction buildFractionMaxDenominator(double value, int maxDenominator){
return buildFractionMaxDenominator(value, 0, maxDenominator, 100);
diff --git a/poi/src/main/java/org/apache/poi/ss/formula/eval/EvaluationException.java b/poi/src/main/java/org/apache/poi/ss/formula/eval/EvaluationException.java
index e094df4649..b0071a728c 100644
--- a/poi/src/main/java/org/apache/poi/ss/formula/eval/EvaluationException.java
+++ b/poi/src/main/java/org/apache/poi/ss/formula/eval/EvaluationException.java
@@ -21,9 +21,9 @@ package org.apache.poi.ss.formula.eval;
* This class is used to simplify error handling logic within operator and function
* implementations. Note - OperationEval.evaluate() and Function.evaluate()
* method signatures do not throw this exception so it cannot propagate outside.
- *
+ *
* Here is an example coded without EvaluationException, to show how it can help:
- *
- *
- *
+ *
* Note - Only standard evaluation errors are represented by 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.
- *
+ * be taken to not translate any POI internal error into an Excel evaluation error code.
+ *
* @author Josh Micich
*/
public final class EvaluationException extends Exception {
@@ -127,7 +127,7 @@ public final class EvaluationException extends Exception {
public static EvaluationException numberError() {
return new EvaluationException(ErrorEval.NUM_ERROR);
}
-
+
public ErrorEval getErrorEval() {
return _errorEval;
}
diff --git a/poi/src/main/java/org/apache/poi/ss/formula/eval/RelationalOperationEval.java b/poi/src/main/java/org/apache/poi/ss/formula/eval/RelationalOperationEval.java
index 2a9f2e34a7..a9684c95d9 100644
--- a/poi/src/main/java/org/apache/poi/ss/formula/eval/RelationalOperationEval.java
+++ b/poi/src/main/java/org/apache/poi/ss/formula/eval/RelationalOperationEval.java
@@ -54,7 +54,7 @@ public abstract class RelationalOperationEval extends Fixed2ArgFunction implemen
*
* Blank > Negative numbers
* Blank == 0
- * Blank < Positive numbers
+ * Blank < Positive numbers
*
*/
diff --git a/poi/src/main/java/org/apache/poi/ss/formula/functions/Countifs.java b/poi/src/main/java/org/apache/poi/ss/formula/functions/Countifs.java
index 0ac50635aa..42c158613e 100644
--- a/poi/src/main/java/org/apache/poi/ss/formula/functions/Countifs.java
+++ b/poi/src/main/java/org/apache/poi/ss/formula/functions/Countifs.java
@@ -32,10 +32,11 @@ public class Countifs extends Baseifs {
public static final FreeRefFunction instance = new Countifs();
/**
- * https://support.office.com/en-us/article/COUNTIFS-function-dda3dc6e-f74e-4aee-88bc-aa8c2a866842?ui=en-US&rs=en-US&ad=US
* COUNTIFS(criteria_range1, criteria1, [criteria_range2, criteria2]...)
* need at least 2 arguments and need to have an even number of arguments (criteria_range1, criteria1 plus x*(criteria_range, criteria))
+ *
* @see org.apache.poi.ss.formula.functions.Baseifs#hasInitialRange()
+ * @see COUNTIFS function
*/
protected boolean hasInitialRange() {
return false;
diff --git a/poi/src/main/java/org/apache/poi/ss/formula/functions/Dec2Bin.java b/poi/src/main/java/org/apache/poi/ss/formula/functions/Dec2Bin.java
index cbac6b2ebf..2ec9ea30c7 100644
--- a/poi/src/main/java/org/apache/poi/ss/formula/functions/Dec2Bin.java
+++ b/poi/src/main/java/org/apache/poi/ss/formula/functions/Dec2Bin.java
@@ -24,7 +24,7 @@ import org.apache.poi.ss.formula.eval.StringEval;
import org.apache.poi.ss.formula.eval.ValueEval;
/**
- * Implementation for Excel Bin2Dec() function.
+ * Implementation for Excel Bin2Dec() function.
*
* Syntax:
@@ -38,7 +38,7 @@ import org.apache.poi.ss.formula.eval.ValueEval;
*
* Remarks
*
+ * Implementation for Excel DELTA() function.
*
* Syntax:
@@ -35,11 +35,11 @@ import org.apache.poi.ss.formula.eval.*;
* Negative numbers are represented using two's-complement notation.
*
*
*
* The number of characters to use. The places argument is useful for padding the
* return value with leading 0s (zeros).
diff --git a/poi/src/main/java/org/apache/poi/ss/formula/functions/FinanceLib.java b/poi/src/main/java/org/apache/poi/ss/formula/functions/FinanceLib.java
index dc4917f5e2..9f7aeaebae 100644
--- a/poi/src/main/java/org/apache/poi/ss/formula/functions/FinanceLib.java
+++ b/poi/src/main/java/org/apache/poi/ss/formula/functions/FinanceLib.java
@@ -33,13 +33,16 @@ package org.apache.poi.ss.formula.functions;
*
+ * Online References:
*
+ *
* Symbols used in the formulae that follow:
* Starting with the guess, the method cycles through the calculation until the result
* is accurate within 0.00001 percent. If IRR can't find a result that works
- * after 20 tries, the Double.NaN<> is returned.
+ * after 20 tries, the {@code Double.NaN} is returned.
* Example:
@@ -68,10 +68,12 @@ public enum FormulaError {
/**
* Intended to indicate when what looks like a name is used, but no such name has been defined.
* Example:
- * XYZ/3, where XYZ is not a defined name. Total is & A10,
- * where neither Total nor is is a defined name. Presumably, "Total is " & A10
- * was intended. SUM(A1C10), where the range A1:C10 was intended.
- *
*
*/
public interface PathCommand {
diff --git a/poi/src/main/java/org/apache/poi/sl/draw/geom/XYAdjustHandle.java b/poi/src/main/java/org/apache/poi/sl/draw/geom/XYAdjustHandle.java
index 46975da2c8..0c1ff04f90 100644
--- a/poi/src/main/java/org/apache/poi/sl/draw/geom/XYAdjustHandle.java
+++ b/poi/src/main/java/org/apache/poi/sl/draw/geom/XYAdjustHandle.java
@@ -67,11 +67,6 @@ public final class XYAdjustHandle implements AdjustHandle {
/**
* Gets the value of the pos property.
- *
- * @return
- * possible object is
- * {@link CTAdjPoint2D }
- *
*/
public AdjustPoint getPos() {
return pos;
@@ -79,11 +74,6 @@ public final class XYAdjustHandle implements AdjustHandle {
/**
* Sets the value of the pos property.
- *
- * @param value
- * allowed object is
- * {@link CTAdjPoint2D }
- *
*/
public void setPos(AdjustPoint value) {
this.pos = value;
diff --git a/poi/src/main/java/org/apache/poi/sl/usermodel/SlideShowFactory.java b/poi/src/main/java/org/apache/poi/sl/usermodel/SlideShowFactory.java
index a32123afe5..5a5facb0cf 100644
--- a/poi/src/main/java/org/apache/poi/sl/usermodel/SlideShowFactory.java
+++ b/poi/src/main/java/org/apache/poi/sl/usermodel/SlideShowFactory.java
@@ -151,7 +151,7 @@ public final class SlideShowFactory {
* @return The created SlideShow
*
* @throws IOException if an error occurs while reading the data
- * @throws EncryptedDocumentException If the SlideShow,?> given is password protected
+ * @throws EncryptedDocumentException If the SlideShow given is password protected
*/
public static SlideShow,?> create(InputStream inp) throws IOException, EncryptedDocumentException {
return create(inp, null);
diff --git a/poi/src/main/java/org/apache/poi/sl/usermodel/TextParagraph.java b/poi/src/main/java/org/apache/poi/sl/usermodel/TextParagraph.java
index 354b357b94..a6c4394278 100644
--- a/poi/src/main/java/org/apache/poi/sl/usermodel/TextParagraph.java
+++ b/poi/src/main/java/org/apache/poi/sl/usermodel/TextParagraph.java
@@ -31,7 +31,7 @@ public interface TextParagraph<
/**
* Specifies a list of text alignment types
*/
- public enum TextAlign {
+ enum TextAlign {
/**
* For horizontal text, left aligned.
* For vertical text, top aligned.
@@ -54,22 +54,22 @@ public interface TextParagraph<
* Align text so that it is justified across the whole line. It
* is smart in the sense that it will not justify sentences
* which are short
- *
+ *
* For horizontal text, flush left and right.
* For vertical text, flush top and bottom.
*/
JUSTIFY,
-
+
/**
* Kashida justify low.
- */
+ */
JUSTIFY_LOW,
/**
* Distribute space between characters.
*/
DIST,
-
+
/**
* Thai distribution justification.
*/
@@ -77,28 +77,28 @@ public interface TextParagraph<
}
/**
- *
+ *
*/
- public enum FontAlign {
+ enum FontAlign {
AUTO,
-
+
/**
* Characters hang from top of line height.
* Also known as "Hanging"
*/
TOP,
-
+
/**
* Characters centered within line height.
*/
CENTER,
-
+
/**
* Place characters on font baseline.
- * Also known as "Roman"
+ * Also known as "Roman"
*/
BASELINE,
-
+
/**
* Characters are anchored to the very bottom of a single line.
* This is different than BASELINE because of letters such as "g", "q", and "y".
@@ -106,15 +106,15 @@ public interface TextParagraph<
*/
BOTTOM
}
-
- public interface BulletStyle {
+
+ interface BulletStyle {
String getBulletCharacter();
String getBulletFont();
-
+
/**
* The bullet point font size
- * If bulletFontSize >= 0, then space is a percentage of normal line height.
- * If bulletFontSize < 0, the absolute value in points
+ * If bulletFontSize >= 0, then space is a percentage of normal line height.
+ * If bulletFontSize < 0, the absolute value in points
*
* @return the bullet point font size
*/
@@ -124,7 +124,7 @@ public interface TextParagraph<
* Convenience function to set a solid color
*/
void setBulletFontColor(Color color);
-
+
void setBulletFontColor(PaintStyle color);
/**
@@ -133,7 +133,7 @@ public interface TextParagraph<
* A {@code null} value means to use the text font color.
*/
PaintStyle getBulletFontColor();
-
+
AutoNumberingScheme getAutoNumberingScheme();
/**
* Index (1-based) of the first auto number value, or null if auto numbering scheme
@@ -173,8 +173,8 @@ public interface TextParagraph<
*
* @param spaceBefore the vertical white space before the paragraph, null to unset
*/
- void setSpaceBefore(Double spaceBefore);
-
+ void setSpaceBefore(Double spaceBefore);
+
/**
* The amount of vertical white space after the paragraph
* This may be specified in two different ways, percentage spacing and font point spacing:
@@ -185,7 +185,7 @@ public interface TextParagraph<
*
* @return the vertical white space after the paragraph or null, if unset
*/
- Double getSpaceAfter();
+ Double getSpaceAfter();
/**
* Set the amount of vertical white space that will be present after the paragraph.
@@ -206,8 +206,8 @@ public interface TextParagraph<
*
* @param spaceAfter the vertical white space after the paragraph, null to unset
*/
- public void setSpaceAfter(Double spaceAfter);
-
+ void setSpaceAfter(Double spaceAfter);
+
/**
* @return the left margin (in points) of the paragraph or null, if unset
*/
@@ -217,19 +217,19 @@ public interface TextParagraph<
* Specifies the left margin of the paragraph. This is specified in addition to the text body
* inset and applies only to this text paragraph. That is the text body Inset and the LeftMargin
* attributes are additive with respect to the text position.
- *
+ *
* @param leftMargin the left margin (in points) or null to unset
*/
void setLeftMargin(Double leftMargin);
-
-
+
+
/**
* Specifies the right margin of the paragraph. This is specified in addition to the text body
* inset and applies only to this text paragraph. That is the text body Inset and the RightMargin
* attributes are additive with respect to the text position.
- *
+ *
* The right margin is not support and therefore ignored by the HSLF implementation.
- *
+ *
* @return the right margin (in points) of the paragraph or null, if unset
*/
Double getRightMargin();
@@ -238,16 +238,16 @@ public interface TextParagraph<
* @param rightMargin the right margin (in points) of the paragraph
*/
void setRightMargin(Double rightMargin);
-
+
/**
* @return the indent (in points) applied to the first line of text in the paragraph.
* or null, if unset
*/
Double getIndent();
-
+
/**
- * Specifies the indent size that will be applied to the first line of text in the paragraph.
- *
+ * Specifies the indent size that will be applied to the first line of text in the paragraph.
+ *
* @param indent the indent (in points) applied to the first line of text in the paragraph
*/
void setIndent(Double indent);
@@ -255,7 +255,7 @@ public interface TextParagraph<
/**
* @return the text level of this paragraph (0-based). Default is 0.
- */
+ */
int getIndentLevel();
/**
@@ -266,19 +266,19 @@ public interface TextParagraph<
* @param level the level (0 ... 4)
*/
void setIndentLevel(int level);
-
+
/**
* Returns the vertical line spacing that is to be used within a paragraph.
* This may be specified in two different ways, percentage spacing and font point spacing:
* getParentShape();
-
+
/**
* Fetch the text runs that are contained within this block of text
*/
@@ -368,14 +366,14 @@ public interface TextParagraph<
/**
* Convenience method to determine if this text paragraph is part of
* the slide header or footer
- *
+ *
* @return true if this paragraph is part of a header or footer placeholder
- *
+ *
* @since POI 3.15-beta2
*/
boolean isHeaderOrFooter();
-
-
+
+
/**
* Get the {@link TabStop TabStops} - the list can't be and it's entries shouldn't be modified.
* Opposed to other properties, this method is not cascading to the master sheet,
@@ -383,7 +381,7 @@ public interface TextParagraph<
* different levels aren't merged.
*
* @return the tabstop collection or {@code null} if no tabstops are defined
- *
+ *
* @since POI 4.0.0
*/
List extends TabStop> getTabStops();
@@ -391,8 +389,6 @@ public interface TextParagraph<
/**
* Set the {@link TabStop} collection
*
- * @param tabStops the {@link TabStop} collection
- *
* @since POI 4.0.0
*/
void addTabStops(double positionInPoints, TabStop.TabStopType tabStopType);
@@ -400,7 +396,7 @@ public interface TextParagraph<
/**
* Removes the tabstops of this paragraphs.
* This doesn't affect inherited tabstops, e.g. inherited by the slide master
- *
+ *
* @since POI 4.0.0
*/
void clearTabStops();
diff --git a/poi/src/main/java/org/apache/poi/ss/format/CellFormatCondition.java b/poi/src/main/java/org/apache/poi/ss/format/CellFormatCondition.java
index 96e9c5fcd8..d44e18f4a7 100644
--- a/poi/src/main/java/org/apache/poi/ss/format/CellFormatCondition.java
+++ b/poi/src/main/java/org/apache/poi/ss/format/CellFormatCondition.java
@@ -49,11 +49,11 @@ public abstract class CellFormatCondition {
/**
* Returns an instance of a condition object.
*
- * @param opString The operator as a string. One of "<",
- * "<=", ">", ">=",
- * "=", "==", "!=", or
- * "<>".
- * @param constStr The constant (such as "12").
+ * @param opString The operator as a string. One of {@code <},
+ * {@code <=}, {@code >}, {@code >=},
+ * {@code =}, {@code ==}, {@code !=} or
+ * {@code <>}.
+ * @param constStr The constant (such as {@code 12}).
*
* @return A condition object for the given condition.
*/
diff --git a/poi/src/main/java/org/apache/poi/ss/format/CellFormatPart.java b/poi/src/main/java/org/apache/poi/ss/format/CellFormatPart.java
index c03dbc5795..51f67df8b3 100644
--- a/poi/src/main/java/org/apache/poi/ss/format/CellFormatPart.java
+++ b/poi/src/main/java/org/apache/poi/ss/format/CellFormatPart.java
@@ -38,15 +38,13 @@ import static org.apache.poi.ss.format.CellFormatter.quote;
* values.
*
+ *
+ * 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.{@code
* public Eval evaluate(Eval[] args, int srcRow, short srcCol) {
* // ...
* Eval arg0 = args[0];
@@ -47,14 +47,14 @@ package org.apache.poi.ss.formula.eval;
* temp += ((NumericValueEval)ve).getNumberValue();
* }
* // ...
- * }
- *
- * In this example, if any error is encountered while processing the arguments, an error is
+ * }
+ * }
* Using EvaluationException allows the error returning code to be consolidated to one
* place.
+ *
* It is not mandatory to use EvaluationException, doing so might give the following advantages:{@code
* public Eval evaluate(Eval[] args, int srcRow, short srcCol) {
* try {
* // ...
@@ -90,21 +90,21 @@ package org.apache.poi.ss.formula.eval;
* }
* return temp;
*}
- *
+ * }
* - Methods can more easily be extracted, allowing for re-use.
* - Type management (typecasting etc) is simpler because error conditions have been separated from
* intermediate calculation values.
* - Fewer local variables are required. Local variables can have stronger types.
- * - It is easier to mimic common Excel error handling behaviour (exit upon encountering first
- * error), because exceptions conveniently propagate up the call stack regardless of execution
+ * - It is easier to mimic common Excel error handling behaviour (exit upon encountering first
+ * error), because exceptions conveniently propagate up the call stack regardless of execution
* points or the number of levels of nested calls.
Bin2Dec (number,[places] )
*
- *
* For more info on the terms/abbreviations please use the references below
* (hyperlinks are subject to change):
- * Online References:
+ *
DEC2HEX (number,places )
*
- *
*
- * places
+ * Places
*
- * Implementation Notes:
+ *
+ * Implementation Notes:
*
*
null otherwise
+ * @return - border formatting object if defined, {@code null} otherwise
*/
BorderFormatting getBorderFormatting();
/**
- * @return - font formatting object if defined, null otherwise
+ * @return - font formatting object if defined, {@code null} otherwise
*/
FontFormatting getFontFormatting();
@@ -42,15 +42,15 @@ public interface DifferentialStyleProvider {
ExcelNumberFormat getNumberFormat();
/**
- * @return - pattern formatting object if defined, null otherwise
+ * @return - pattern formatting object if defined, {@code null} otherwise
*/
PatternFormatting getPatternFormatting();
/**
* This is the number of rows or columns in a band or stripe.
- * For styles that represent stripes, it must be > 1, for all others it is 0.
+ * For styles that represent stripes, it must be > 1, for all others it is 0.
* Not the greatest overloading by the OOXML spec.
- * @return number of rows/columns in a stripe for stripe styles, 0 for all others
+ * @return number of rows/columns in a stripe for stripe styles, 0 for all others
*/
int getStripeSize();
}
diff --git a/poi/src/main/java/org/apache/poi/ss/usermodel/FontScheme.java b/poi/src/main/java/org/apache/poi/ss/usermodel/FontScheme.java
index e1b7712309..1bf2318362 100644
--- a/poi/src/main/java/org/apache/poi/ss/usermodel/FontScheme.java
+++ b/poi/src/main/java/org/apache/poi/ss/usermodel/FontScheme.java
@@ -23,7 +23,7 @@ package org.apache.poi.ss.usermodel;
* When a font definition is part of a theme definition, then the font is categorized as either a major or minor font scheme component.
* When a new theme is chosen, every font that is part of a theme definition is updated to use the new major or minor font definition for that
* theme.
- * Usually major fonts are used for styles like headings, and minor fonts are used for body & paragraph text.
+ * Usually major fonts are used for styles like headings, and minor fonts are used for body & paragraph text.
*
* @author Gisella Bronzetti
*/
@@ -34,9 +34,9 @@ public enum FontScheme {
MAJOR(2),
MINOR(3);
- private int value;
+ private final int value;
- private FontScheme(int val) {
+ FontScheme(int val) {
value = val;
}
@@ -44,12 +44,9 @@ public enum FontScheme {
return value;
}
- private static FontScheme[] _table = new FontScheme[4];
- static {
- for (FontScheme c : values()) {
- _table[c.getValue()] = c;
- }
- }
+ private static final FontScheme[] _table = {
+ null, NONE, MAJOR, MINOR
+ };
public static FontScheme valueOf(int value){
return _table[value];
diff --git a/poi/src/main/java/org/apache/poi/ss/usermodel/FormulaError.java b/poi/src/main/java/org/apache/poi/ss/usermodel/FormulaError.java
index 996861e75a..744f4afb60 100644
--- a/poi/src/main/java/org/apache/poi/ss/usermodel/FormulaError.java
+++ b/poi/src/main/java/org/apache/poi/ss/usermodel/FormulaError.java
@@ -24,13 +24,13 @@ import java.util.HashMap;
/**
* Enumerates error values in SpreadsheetML formula calculations.
- *
+ *
* See also OOO's excelfileformat.pdf (2.5.6)
*/
public enum FormulaError {
@Internal
_NO_ERROR(-1, "(no error)"),
-
+
/**
* Intended to indicate when two areas are required to intersect, but do not.
*
+ *
*/
NAME(0x1D, "#NAME?"),
@@ -100,12 +102,12 @@ public enum FormulaError {
* This error value can be produced by calling the function NA
*/
NA(0x2A, "#N/A"),
-
+
// These are POI-specific error codes
// It is desirable to make these (arbitrary) strings look clearly different from any other
// value expression that might appear in a formula. In addition these error strings should
// look unlike the standard Excel errors. Hence tilde ('~') was used.
-
+
/**
* POI specific code to indicate that there is a circular reference
* in the formula
@@ -157,7 +159,7 @@ public enum FormulaError {
smap.put(error.getString(), error);
}
}
-
+
public static boolean isValidCode(int errorCode) {
for (FormulaError error : values()) {
if (error.getCode() == errorCode) return true;
diff --git a/poi/src/main/java/org/apache/poi/ss/usermodel/Name.java b/poi/src/main/java/org/apache/poi/ss/usermodel/Name.java
index 03e13a83d9..65ca8e3f92 100644
--- a/poi/src/main/java/org/apache/poi/ss/usermodel/Name.java
+++ b/poi/src/main/java/org/apache/poi/ss/usermodel/Name.java
@@ -24,7 +24,7 @@ package org.apache.poi.ss.usermodel;
* cell reference, constant or a formula.
*
+ * } */ public interface Name { diff --git a/poi/src/main/java/org/apache/poi/ss/usermodel/Table.java b/poi/src/main/java/org/apache/poi/ss/usermodel/Table.java index ef7fe33797..049218a663 100644 --- a/poi/src/main/java/org/apache/poi/ss/usermodel/Table.java +++ b/poi/src/main/java/org/apache/poi/ss/usermodel/Table.java @@ -34,7 +34,7 @@ public interface Table { * */ Pattern isStructuredReference = Pattern.compile("[a-zA-Z_\\\\][a-zA-Z0-9._]*\\[.*\\]"); - + /** * Get the top-left column index relative to the sheet * @return table start column index on sheet @@ -60,16 +60,16 @@ public interface Table { * @return table name */ String getName(); - + /** * @return name of the table style, if there is one. May be a built-in name or user-defined. * @since 3.17 beta 1 */ String getStyleName(); - + /** * Returns the index of a given named column in the table (names are case insensitive in XSSF). - * Note this list is lazily loaded and cached for performance. + * Note this list is lazily loaded and cached for performance. * Changes to the underlying table structure are not reflected in later calls * unless+ *{@code * Sheet sheet = workbook.createSheet("Loan Calculator"); * Name name; * @@ -46,9 +46,9 @@ package org.apache.poi.ss.usermodel; * * name = wb.createName(); * name.setNameName("Values_Entered"); - * name.setRefersToFormula("IF(Loan_Amount*Interest_Rate>0,1,0)"); + * name.setRefersToFormula("IF(Loan_Amount*Interest_Rate > 0,1,0)"); * - *
XSSFTable.updateHeaders() is called to reset the cache.
* @param columnHeader the column header name to get the table column index of
@@ -85,34 +85,34 @@ public interface Table {
/**
* Note: This is misleading. The OOXML spec indicates this is true if the totals row
* has ever been shown, not whether or not it is currently displayed.
- * Use {@link #getTotalsRowCount()} > 0 to decide whether or not the totals row is visible.
+ * Use {@link #getTotalsRowCount()} > 0 to decide whether or not the totals row is visible.
* @return true if a totals row has ever been shown for this table
* @since 3.15 beta 2
* @see #getTotalsRowCount()
*/
boolean isHasTotalsRow();
-
+
/**
* @return 0 for no totals rows, 1 for totals row shown.
- * Values > 1 are not currently used by Excel up through 2016, and the OOXML spec
+ * Values > 1 are not currently used by Excel up through 2016, and the OOXML spec
* doesn't define how they would be implemented.
* @since 3.17 beta 1
*/
int getTotalsRowCount();
-
+
/**
* @return 0 for no header rows, 1 for table headers shown.
- * Values > 1 might be used by Excel for pivot tables?
+ * Values > 1 might be used by Excel for pivot tables?
* @since 3.17 beta 1
*/
int getHeaderRowCount();
-
+
/**
* @return TableStyleInfo for this instance
* @since 3.17 beta 1
*/
TableStyleInfo getStyle();
-
+
/**
* checks if the given cell is part of the table. Includes checking that they are on the same sheet.
* @param cell
@@ -124,7 +124,7 @@ public interface Table {
if (cell == null) return false;
return contains(new CellReference(cell.getSheet().getSheetName(), cell.getRowIndex(), cell.getColumnIndex(), true, true));
}
-
+
/**
* checks if the given cell is part of the table. Includes checking that they are on the same sheet.
* @param cell reference to a possibly undefined cell location
diff --git a/poi/src/main/java/org/apache/poi/ss/util/CellRangeUtil.java b/poi/src/main/java/org/apache/poi/ss/util/CellRangeUtil.java
index 3b8b5251d4..c3a7afa1e9 100644
--- a/poi/src/main/java/org/apache/poi/ss/util/CellRangeUtil.java
+++ b/poi/src/main/java/org/apache/poi/ss/util/CellRangeUtil.java
@@ -23,7 +23,7 @@ import java.util.List;
/**
* Utility class that builds on {@link CellRangeAddress}
- *
+ *
* Portions of this class may be moved to {@link CellRangeAddressBase}
*/
public final class CellRangeUtil {
@@ -40,12 +40,12 @@ public final class CellRangeUtil {
/**
* Get the type of intersection between two cell ranges
- *
+ *
* @param crB - the specified range
* @return code which reflects how the specified range is related to this range.true if the ranges have a complete shared border (i.e.
* the two ranges together make a simple rectangular region.
*/
@@ -207,7 +207,7 @@ public final class CellRangeUtil {
int oFirstCol = crB.getFirstColumn();
int oLastCol = crB.getLastColumn();
- if (crA.getFirstRow() > 0 && crA.getFirstRow()-1 == oLastRow ||
+ if (crA.getFirstRow() > 0 && crA.getFirstRow()-1 == oLastRow ||
oFirstRow > 0 && oFirstRow-1 == crA.getLastRow()) {
// ranges have a horizontal border in common
// make sure columns are identical:
@@ -225,14 +225,14 @@ public final class CellRangeUtil {
/**
* Create an enclosing CellRange for the two cell ranges.
- *
+ *
* @return enclosing CellRange
*/
public static CellRangeAddress createEnclosingCellRange(CellRangeAddress crA, CellRangeAddress crB) {
if( crB == null) {
return crA.copy();
}
-
+
int minRow = lt(crB.getFirstRow(), crA.getFirstRow()) ?crB.getFirstRow() :crA.getFirstRow();
int maxRow = gt(crB.getLastRow(), crA.getLastRow()) ?crB.getLastRow() :crA.getLastRow();
int minCol = lt(crB.getFirstColumn(),crA.getFirstColumn())?crB.getFirstColumn():crA.getFirstColumn();
diff --git a/poi/src/main/java/org/apache/poi/util/IOUtils.java b/poi/src/main/java/org/apache/poi/util/IOUtils.java
index 974efdf64b..115e05734d 100644
--- a/poi/src/main/java/org/apache/poi/util/IOUtils.java
+++ b/poi/src/main/java/org/apache/poi/util/IOUtils.java
@@ -58,7 +58,7 @@ public final class IOUtils {
}
/**
- * If this value is set to > 0, {@link #safelyAllocate(long, int)} will ignore the
+ * If this value is set to > 0, {@link #safelyAllocate(long, int)} will ignore the
* maximum record length parameter.
*
* This is designed to allow users to bypass the hard-coded maximum record lengths
diff --git a/poi/src/main/java/org/apache/poi/util/IntList.java b/poi/src/main/java/org/apache/poi/util/IntList.java
index f536e089e9..4bfe8caffe 100644
--- a/poi/src/main/java/org/apache/poi/util/IntList.java
+++ b/poi/src/main/java/org/apache/poi/util/IntList.java
@@ -85,7 +85,7 @@ public class IntList
* @param value the new value
*
* @exception IndexOutOfBoundsException if the index is out of
- * range (index < 0 || index > size()).
+ * range (index < 0 || index > size()).
*/
public void add(final int index, final int value)
@@ -179,7 +179,7 @@ public class IntList
* @return true if this list changed as a result of the call.
*
* @exception IndexOutOfBoundsException if the index is out of
- * range (index < 0 || index > size())
+ * range (index < 0 || index > size())
*/
public boolean addAll(final int index, final IntList c)
@@ -312,7 +312,7 @@ public class IntList
* @return the element at the specified position in this list.
*
* @exception IndexOutOfBoundsException if the index is out of
- * range (index < 0 || index >= size()).
+ * range (index < 0 || index >= size()).
*/
public int get(final int index)
@@ -425,7 +425,7 @@ public class IntList
* @return the element previously at the specified position.
*
* @exception IndexOutOfBoundsException if the index is out of
- * range (index < 0 || index >= size()).
+ * range (index < 0 || index >= size()).
*/
public int remove(final int index)
@@ -534,7 +534,7 @@ public class IntList
* @return the element previously at the specified position.
*
* @exception IndexOutOfBoundsException if the index is out of
- * range (index < 0 || index >= size()).
+ * range (index < 0 || index >= size()).
*/
public int set(final int index, final int element)