protected class ExternalName implements Name {
- private CTExternalDefinedName name;
+ private final CTExternalDefinedName name;
protected ExternalName(CTExternalDefinedName name) {
this.name = name;
}
+ @Override
public String getNameName() {
return name.getName();
}
+ @Override
public void setNameName(String name) {
this.name.setName(name);
}
+ @Override
public String getSheetName() {
int sheetId = getSheetIndex();
if (sheetId >= 0) {
return null;
}
}
+ @Override
public int getSheetIndex() {
if (name.isSetSheetId()) {
return (int)name.getSheetId();
}
return -1;
}
+ @Override
public void setSheetIndex(int sheetId) {
name.setSheetId(sheetId);
}
+ @Override
public String getRefersToFormula() {
// Return, without the leading =
return name.getRefersTo().substring(1);
}
+ @Override
public void setRefersToFormula(String formulaText) {
// Save with leading =
name.setRefersTo('=' + formulaText);
}
+ @Override
public boolean isFunctionName() {
return false;
}
+ @Override
public boolean isDeleted() {
return false;
}
return false;
}
+ @Override
public String getComment() {
return null;
}
+ @Override
public void setComment(String comment) {
throw new IllegalStateException("Not Supported");
}
+ @Override
public void setFunction(boolean value) {
throw new IllegalStateException("Not Supported");
}
* according to docs ONLY SST
*/
private int field_2_num_unique_strings;
- private IntMapper<UnicodeString> field_3_strings;
+ private final IntMapper<UnicodeString> field_3_strings;
- private SSTDeserializer deserializer;
+ private final SSTDeserializer deserializer;
/**
* Offsets from the beginning of the SST record (even across continuations)
return field_3_strings.get( id );
}
+ @Override
public short getSid() {
return sid;
}
* <P>
* The data consists of sets of string data. This string data is
* arranged as follows:
- * </P>
- * <pre>
+ * <pre>{@code
* short string_length; // length of string data
* byte string_flag; // flag specifying special string
* // handling
* // array is run_count)
* byte[] extension; // optional extension (length of array
* // is extend_length)
- * </pre>
+ * }</pre>
* <P>
* The string_flag is bit mapped as follows:
- * </P>
- * <P>
- * <TABLE summary="string_flag mapping">
+ * <TABLE>
+ * <caption>string_flag mapping</caption>
* <TR>
* <TH>Bit number</TH>
* <TH>Meaning if 0</TH>
return field_3_strings.size();
}
+ @Override
protected void serialize(ContinuableRecordOutput out) {
SSTSerializer serializer = new SSTSerializer(field_3_strings, getNumStrings(), getNumUniqueStrings() );
serializer.serialize(out);
return GenericRecordUtil.getGenericProperties(
"numStrings", this::getNumStrings,
"numUniqueStrings", this::getNumUniqueStrings,
- "strings", () -> field_3_strings.getElements(),
+ "strings", field_3_strings::getElements,
"bucketAbsoluteOffsets", () -> bucketAbsoluteOffsets,
"bucketRelativeOffsets", () -> bucketRelativeOffsets
);
public void clearAllCachedResultValues() {
// nothing to do
}
-
+
@Override
public HSSFName createName() {
return _uBook.createName();
public int getExternalSheetIndex(String workbookName, String sheetName) {
return _iBook.getExternalSheetIndex(workbookName, sheetName);
}
-
+
@Override
public Ptg get3DReferencePtg(CellReference cr, SheetIdentifier sheet) {
int extIx = getSheetExtIx(sheet);
*
* @param name the name to search
* @param sheetIndex the 0-based index of the sheet this formula belongs to.
- * The sheet index is required to resolve sheet-level names. <code>-1</code> means workbook-global names
+ * The sheet index is required to resolve sheet-level names. {@code -1} means workbook-global names
*/
@Override
public EvaluationName getName(String name, int sheetIndex) {
// Not actually sheet based at all - is workbook scoped
return null;
}
-
+
// Look up the local sheet
String sheetName = getSheetName(localSheetIndex);
-
+
// Is it a single local sheet, or a range?
int lastLocalSheetIndex = _iBook.getLastSheetIndexFromExternSheetIndex(externSheetIndex);
if (lastLocalSheetIndex == localSheetIndex) {
}
/**
- * @throws IllegalStateException: XSSF-style external references are not supported for HSSF
+ * @throws IllegalStateException XSSF-style external references are not supported for HSSF
*/
@Override
public ExternalSheet getExternalSheet(String firstSheetName, String lastSheetName, int externalWorkbookNumber) {
}
/**
- * @throws IllegalStateException: XSSF-style external names are not supported for HSSF
+ * @throws IllegalStateException XSSF-style external names are not supported for HSSF
*/
@Override
public ExternalName getExternalName(String nameName, String sheetName, int externalWorkbookNumber) {
if (sheetIden == null) {
extIx = -1;
} else {
- String workbookName = sheetIden.getBookName();
+ String workbookName = sheetIden.getBookName();
String firstSheetName = sheetIden.getSheetIdentifier().getName();
String lastSheetName = firstSheetName;
-
+
if (sheetIden instanceof SheetRangeIdentifier) {
lastSheetName = ((SheetRangeIdentifier)sheetIden).getLastSheetIdentifier().getName();
}
-
+
if (workbookName == null) {
int firstSheetIndex = _uBook.getSheetIndex(firstSheetName);
int lastSheetIndex = _uBook.getSheetIndex(lastSheetName);
}
/**
- * @throws IllegalStateException: data tables are not supported in Excel 97-2003 format
+ * @throws IllegalStateException data tables are not supported in Excel 97-2003 format
*/
@Override
public Table getTable(String name) {
* 'named range' or name of a user defined function.
*/
public final class HSSFName implements Name {
-
- private HSSFWorkbook _book;
- private NameRecord _definedNameRec;
- private NameCommentRecord _commentRec;
- /**
+ private final HSSFWorkbook _book;
+ private final NameRecord _definedNameRec;
+ private final NameCommentRecord _commentRec;
+
+ /**
* Creates new HSSFName - called by HSSFWorkbook to create a name from
* scratch.
*
/* package */ HSSFName(HSSFWorkbook book, NameRecord name) {
this(book, name, null);
}
- /**
+ /**
* Creates new HSSFName - called by HSSFWorkbook to create a name from
* scratch.
*
/** Get the sheets name which this named range is referenced to
* @return sheet name, which this named range referred to
*/
+ @Override
public String getSheetName() {
int indexToExternSheet = _definedNameRec.getExternSheetNumber();
/**
* @return text name of this defined name
*/
+ @Override
public String getNameName(){
return _definedNameRec.getNameText();
}
* <p>
* A name must always be unique within its scope. POI prevents you from defining a name that is not unique
* within its scope. However you can use the same name in different scopes. Example:
- * <pre><blockquote>
+ * <pre>{@code
* //by default names are workbook-global
* HSSFName name;
* name = workbook.createName();
* name.setSheetIndex(0);
* name.setNameName("sales_08"); //will throw an exception: "The sheet already contains this name (case-insensitive)"
*
- * </blockquote></pre>
- * </p>
+ * }</pre>
*
* @param nameName named range name to set
* @throws IllegalArgumentException if the name is invalid or the name already exists (case-insensitive)
*/
+ @Override
public void setNameName(String nameName){
validateName(nameName);
}
}
}
-
+
// Update our comment, if there is one
if(_commentRec != null) {
_commentRec.setNameText(nameName);
/**
* https://support.office.com/en-us/article/Define-and-use-names-in-formulas-4D0F13AC-53B7-422E-AFD2-ABD7FF379C64#bmsyntax_rules_for_names
- *
+ *
* Valid characters:
* First character: { letter | underscore | backslash }
* Remaining characters: { letter | number | period | underscore }
- *
+ *
* Cell shorthand: cannot be { "C" | "c" | "R" | "r" }
- *
+ *
* Cell references disallowed: cannot be a cell reference $A$1 or R1C1
- *
+ *
* Spaces are not valid (follows from valid characters above)
- *
+ *
* Name length: (XSSF-specific?) 255 characters maximum
- *
+ *
* Case sensitivity: all names are case-insensitive
- *
+ *
* Uniqueness: must be unique (for names with the same scope)
*/
private static void validateName(String name) {
if (name.equalsIgnoreCase("R") || name.equalsIgnoreCase("C")) {
throw new IllegalArgumentException("Invalid name: '"+name+"': cannot be special shorthand R or C");
}
-
+
// is first character valid?
char c = name.charAt(0);
String allowedSymbols = "_\\";
if (!characterIsValid) {
throw new IllegalArgumentException("Invalid name: '"+name+"': first character must be underscore or a letter");
}
-
+
// are all other characters valid?
allowedSymbols = "_.\\"; //backslashes needed for unicode escape
for (final char ch : name.toCharArray()) {
throw new IllegalArgumentException("Invalid name: '"+name+"': name must be letter, digit, period, or underscore");
}
}
-
+
// Is the name a valid $A$1 cell reference
// Because $, :, and ! are disallowed characters, A1-style references become just a letter-number combination
if (name.matches("[A-Za-z]+\\d+")) {
throw new IllegalArgumentException("Invalid name: '"+name+"': cannot be $A$1-style cell reference");
}
}
-
+
// Is the name a valid R1C1 cell reference?
if (name.matches("[Rr]\\d+[Cc]\\d+")) {
throw new IllegalArgumentException("Invalid name: '"+name+"': cannot be R1C1-style cell reference");
}
}
+ @Override
public void setRefersToFormula(String formulaText) {
Ptg[] ptgs = HSSFFormulaParser.parse(formulaText, _book, FormulaType.NAMEDRANGE, getSheetIndex());
_definedNameRec.setNameDefinition(ptgs);
}
+ @Override
public String getRefersToFormula() {
if (_definedNameRec.isFunctionName()) {
throw new IllegalStateException("Only applicable to named ranges");
/**
- * Sets the NameParsedFormula structure that specifies the formula for the
+ * Sets the NameParsedFormula structure that specifies the formula for the
* defined name.
- *
+ *
* @param ptgs the sequence of {@link Ptg}s for the formula.
*/
void setNameDefinition(Ptg[] ptgs) {
}
+ @Override
public boolean isDeleted(){
Ptg[] ptgs = _definedNameRec.getNameDefinition();
return Ptg.doesFormulaReferToDeletedCell(ptgs);
*
* @return true if this name is a function name
*/
+ @Override
public boolean isFunctionName() {
return _definedNameRec.isFunctionName();
}
*
* @return true if this name is a hidden one
*/
+ @Override
public boolean isHidden() {
return _definedNameRec.isHiddenName();
}
* to the collection of sheets as they appear in the workbook.
* @throws IllegalArgumentException if the sheet index is invalid.
*/
+ @Override
public void setSheetIndex(int index){
int lastSheetIx = _book.getNumberOfSheets() - 1;
if (index < -1 || index > lastSheetIx) {
*
* @return the sheet index this name applies to, -1 if this name applies to the entire workbook
*/
+ @Override
public int getSheetIndex(){
return _definedNameRec.getSheetNumber() - 1;
}
*
* @return the user comment for this named range
*/
+ @Override
public String getComment() {
if(_commentRec != null) {
// Prefer the comment record if it has text in it
*
* @param comment the user comment for this named range
*/
+ @Override
public void setComment(String comment){
// Update the main record
_definedNameRec.setDescriptionText(comment);
* Indicates that the defined name refers to a user-defined function.
* This attribute is used when there is an add-in or other code project associated with the file.
*
- * @param value <code>true</code> indicates the name refers to a function.
+ * @param value {@code true} indicates the name refers to a function.
*/
+ @Override
public void setFunction(boolean value) {
_definedNameRec.setFunction(value);
}
*
* @see <a href="http://msdn.microsoft.com/en-us/library/dd926947.aspx">2.3.7.1 Binary Document Password Verifier Derivation Method 1</a>
* @see <a href="http://msdn.microsoft.com/en-us/library/dd905229.aspx">2.3.7.4 Binary Document Password Verifier Derivation Method 2</a>
- * @see <a href="http://www.ecma-international.org/news/TC45_current_work/Office Open XML Part 4 - Markup Language Reference.pdf">Part 4 - Markup Language Reference - Ecma International - 3.2.12 fileSharing</a>
+ * @see <a href="https://www.ecma-international.org/publications-and-standards/standards/ecma-376/">Part 4 - Markup Language Reference - Ecma International - 3.2.12 fileSharing</a>
*
* @param password the password
* @return the verifier (actually a short value)
* (actually limited by available memory in Excel)</li>
* <li>Number of cell styles is 64000</li>
* <li>Length of text cell contents is 32767</li>
- * <ul>
+ * </ul>
*/
EXCEL2007(0x100000, 0x4000, 255, Integer.MAX_VALUE, 64000, 32767);
private final int _maxCellStyles;
private final int _maxTextLength;
- private SpreadsheetVersion(int maxRows, int maxColumns, int maxFunctionArgs, int maxCondFormats, int maxCellStyles, int maxText) {
+ SpreadsheetVersion(int maxRows, int maxColumns, int maxFunctionArgs, int maxCondFormats, int maxCellStyles, int maxText) {
_maxRows = maxRows;
_maxColumns = maxColumns;
_maxFunctionArgs = maxFunctionArgs;
}
/**
- * @return the last (maximum) valid row index, equals to <code> getMaxRows() - 1 </code>
+ * @return the last (maximum) valid row index, equals to {@code getMaxRows() - 1 }
*/
public int getLastRowIndex() {
return _maxRows - 1;
}
/**
- * @return the last (maximum) valid column index, equals to <code> getMaxColumns() - 1 </code>
+ * @return the last (maximum) valid column index, equals to {@code getMaxColumns() - 1 }
*/
public int getLastColumnIndex() {
return _maxColumns - 1;
/**
*
* @return the last valid column index in a ALPHA-26 representation
- * (<code>IV</code> or <code>XFD</code>).
+ * ({@code IV} or {@code XFD}).
*/
public String getLastColumnName() {
return CellReference.convertNumToColString(getLastColumnIndex());
package org.apache.poi.ss.format;
import java.util.Locale;
-import java.util.logging.Logger;
import org.apache.poi.util.LocaleUtil;
* This is the abstract supertype for the various cell formatters.
*/
public abstract class CellFormatter {
- /** The logger to use in the formatting code. */
- private static final Logger LOG = Logger.getLogger(CellFormatter.class.getName());
-
/** The original specified format. */
protected final String format;
protected final Locale locale;
/**
* Format a value according the format string.
- * <p/>
+ * <p>
* NOTE: this method must be thread safe! In particular, if it uses a
* Format instance that is not thread safe, i.e. DateFormat, this method
* must be synchronized, either on the method, if the format is a final
/**
* Format a value according to the type, in the most basic way.
- * <p/>
+ * <p>
* NOTE: this method must be thread safe! In particular, if it uses a
* Format instance that is not thread safe, i.e. DateFormat, this method
* must be synchronized, either on the method, if the format is a final
* @param toAppendTo The buffer to append to.
* @param value The value to format.
*/
+ @Override
public void formatValue(StringBuffer toAppendTo, Object value) {
if (value instanceof Number) {
double val = ((Number) value).doubleValue();
}
/** Equivalent to {@link #formatValue(StringBuffer,Object)}. {@inheritDoc}. */
+ @Override
public void simpleValue(StringBuffer toAppendTo, Object value) {
formatValue(toAppendTo, value);
}
}
}
- /** {@inheritDoc} */
+ @Override
public void formatValue(StringBuffer toAppendTo, Object obj) {
int start = toAppendTo.length();
String text = obj.toString();
* <p>
* For text, this is just printing the text.
*/
+ @Override
public void simpleValue(StringBuffer toAppendTo, Object value) {
SIMPLE_TEXT.formatValue(toAppendTo, value);
}
*
* @since POI 3.15 beta 3
*/
- public void clearAllCachedResultValues();
+ void clearAllCachedResultValues();
class ExternalSheet {
private final String _workbookName;
@Internal
public interface FormulaRenderingWorkbook {
/**
- * @return <code>null</code> if externSheetIndex refers to a sheet inside the current workbook
+ * @return {@code null} if externSheetIndex refers to a sheet inside the current workbook
*/
ExternalSheet getExternalSheet(int externSheetIndex);
import org.apache.poi.ss.formula.functions.ArrayFunction;
import org.apache.poi.ss.formula.functions.Fixed2ArgFunction;
import org.apache.poi.ss.formula.functions.Function;
-import org.apache.poi.ss.formula.functions.MatrixFunction.MutableValueCollector;
-import org.apache.poi.ss.formula.functions.MatrixFunction.TwoArrayArg;
public abstract class TwoOperandNumericOperation extends Fixed2ArgFunction implements ArrayFunction {
return OperandResolver.coerceValueToDouble(ve);
}
- public ValueEval evaluateArray(ValueEval[] args, int srcRowIndex, int srcColumnIndex) {
+ @Override
+ public ValueEval evaluateArray(ValueEval[] args, int srcRowIndex, int srcColumnIndex) {
if (args.length != 2) {
return ErrorEval.VALUE_INVALID;
}
}
+ @Override
public ValueEval evaluate(int srcRowIndex, int srcColumnIndex, ValueEval arg0, ValueEval arg1) {
double result;
try {
protected abstract double evaluate(double d0, double d1) throws EvaluationException;
- 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() {
+ @Override
protected double evaluate(double d0, double d1) {
return d0+d1;
}
};
public static final Function DivideEval = new TwoOperandNumericOperation() {
+ @Override
protected double evaluate(double d0, double d1) throws EvaluationException {
if (d1 == 0.0) {
throw new EvaluationException(ErrorEval.DIV_ZERO);
}
};
public static final Function MultiplyEval = new TwoOperandNumericOperation() {
+ @Override
protected double evaluate(double d0, double d1) {
return d0*d1;
}
};
public static final Function PowerEval = new TwoOperandNumericOperation() {
+ @Override
protected double evaluate(double d0, double d1) {
if(d0 < 0 && Math.abs(d1) > 0.0 && Math.abs(d1) < 1.0) {
return -1 * Math.pow(d0 * -1, d1);
public SubtractEvalClass() {
//
}
+ @Override
protected double evaluate(double d0, double d1) {
return d0-d1;
}
* Represents a workbook being used for forked evaluation. Most operations are delegated to the
* shared master workbook, except those that potentially involve cell values that may have been
* updated after a call to {@link #getOrCreateUpdatableCell(String, int, int)}.<br>
- *
+ *
* For POI internal use only
*/
@Internal
public EvaluationSheet getSheet(int sheetIndex) {
return getSharedSheet(getSheetName(sheetIndex));
}
-
+
@Override
public ExternalName getExternalName(int externSheetIndex, int externNameIndex) {
return _masterBook.getExternalName(externSheetIndex, externNameIndex);
public UDFFinder getUDFFinder() {
return _masterBook.getUDFFinder();
}
-
+
+ @Override
public SpreadsheetVersion getSpreadsheetVersion() {
return _masterBook.getSpreadsheetVersion();
}
-
+
/* (non-Javadoc)
* leave the map alone, if it needs resetting, reusing this class is probably a bad idea.
* @see org.apache.poi.ss.formula.EvaluationSheet#clearAllCachedResultValues()
- *
+ *
* @since POI 3.15 beta 3
*/
@Override
* @param arg0 the first function argument. Empty values are represented with
* {@link BlankEval} or {@link MissingArgEval}, never {@code null}
* @param arg1 the first function argument. Empty values are represented with
- * @link BlankEval} or {@link MissingArgEval}, never {@code null}
+ * {@link BlankEval} or {@link MissingArgEval}, never {@code null}
*
* @param srcRowIndex row index of the cell containing the formula under evaluation
* @param srcColumnIndex column index of the cell containing the formula under evaluation
* <caption>Parameter descriptions</caption>
* <tr><th>range </th><td>is the range of cells to count blanks</td></tr>
* </table>
- * </p>
*/
public final class Countblank extends Fixed1ArgFunction {
* MID returns a specific number of
* characters from a text string, starting at the specified position.<p>
*
- * <b>Syntax<b>:<br> <b>MID</b>(<b>text</b>, <b>start_num</b>,
+ * <b>Syntax</b>:<br> <b>MID</b>(<b>text</b>, <b>start_num</b>,
* <b>num_chars</b>)<br>
*
* Author: Manda Wilson < wilson at c bio dot msk cc dot org >
* {@link DataFormatter} to be done, as this works much the same as the
* display focused work that that does.
*
- * <b>Syntax<b>:<br> <b>TEXT</b>(<b>value</b>, <b>format_text</b>)<br>
+ * <b>Syntax</b>:<br> <b>TEXT</b>(<b>value</b>, <b>format_text</b>)<br>
*/
public static final Function TEXT = new Fixed2ArgFunction() {
* left/right edge, don't append the additional occurrence of the value.</li>
* <li>The display value of the cell is filled, not the underlying raw number.</li>
* </ol>
- * </p>
*/
FILL,
* <p> Two lines inside a cell are separated by a carriage return. </p>
*/
DISTRIBUTED;
-
+
public short getCode() {
return (short) ordinal();
}
* <p>
* A name must always be unique within its scope. POI prevents you from defining a name that is not unique
* within its scope. However you can use the same name in different scopes. Example:
- * <pre><blockquote>
+ * <pre>{@code
* //by default names are workbook-global
* Name name;
* name = workbook.createName();
* name.setSheetIndex(0);
* name.setNameName("sales_08"); //will throw an exception: "The sheet already contains this name (case-insensitive)"
*
- * </blockquote></pre>
- * </p>
+ * }</pre>
+ *
* @param name named range name to set
* @throws IllegalArgumentException if the name is invalid or the already exists within its scope (case-insensitive)
*/
/**
* Returns the formula that the name is defined to refer to.
*
- * @return the reference for this name, <code>null</code> if it has not been set yet. Never empty string
+ * @return the reference for this name, {@code null} if it has not been set yet. Never empty string
* @see #setRefersToFormula(String)
*/
String getRefersToFormula();
* Sets the formula that the name is defined to refer to. The following are representative examples:
*
* <ul>
- * <li><code>'My Sheet'!$A$3</code></li>
- * <li><code>8.3</code></li>
- * <li><code>HR!$A$1:$Z$345</code></li>
- * <li><code>SUM(Sheet1!A1,Sheet2!B2)</li>
- * <li><code>-PMT(Interest_Rate/12,Number_of_Payments,Loan_Amount)</li>
+ * <li>{@code 'My Sheet'!$A$3}</li>
+ * <li>{@code 8.3}</li>
+ * <li>{@code HR!$A$1:$Z$345}</li>
+ * <li>{@code SUM(Sheet1!A1,Sheet2!B2)}</li>
+ * <li>{@code -PMT(Interest_Rate/12,Number_of_Payments,Loan_Amount)}</li>
* </ul>
*
* Note: Using relative values like 'A1:B1' can lead to unexpected moving of
/**
* Checks if this name points to a cell that no longer exists
*
- * @return <code>true</code> if the name refers to a deleted cell, <code>false</code> otherwise
+ * @return {@code true} if the name refers to a deleted cell, {@code false} otherwise
*/
boolean isDeleted();
* Checks if this name is hidden, eg one of the built-in Excel
* internal names
*
- * @return <code>true</code> if the name is a hidden name, <code>false</code> otherwise
+ * @return {@code true} if the name is a hidden name, {@code false} otherwise
*/
boolean isHidden();
* @param sheetId the sheet index this name applies to, -1 unsets this property making the name workbook-global
* @throws IllegalArgumentException if the sheet index is invalid.
*/
- public void setSheetIndex(int sheetId);
+ void setSheetIndex(int sheetId);
/**
* Returns the sheet index this name applies to.
*
* @return the sheet index this name applies to, -1 if this name applies to the entire workbook
*/
- public int getSheetIndex();
+ int getSheetIndex();
/**
* Returns the comment the user provided when the name was created.
*
* @return the user comment for this named range
*/
- public String getComment();
+ String getComment();
/**
* Sets the comment the user provided when the name was created.
*
* @param comment the user comment for this named range
*/
- public void setComment(String comment);
+ void setComment(String comment);
/**
* Indicates that the defined name refers to a user-defined function.
* This attribute is used when there is an add-in or other code project associated with the file.
*
- * @param value <code>true</code> indicates the name refers to a function.
+ * @param value {@code true} indicates the name refers to a function.
*/
void setFunction(boolean value);
}
* Example return values:
* <table>
* <caption>Example return values</caption>
- * <tr><th align='left'>Result</th><th align='left'>Comment</th></tr>
+ * <tr><th>Result</th><th>Comment</th></tr>
* <tr><td>A1:A1</td><td>Single cell area reference without sheet</td></tr>
* <tr><td>A1:$C$1</td><td>Multi-cell area reference without sheet</td></tr>
* <tr><td>Sheet1!A$1:B4</td><td>Standard sheet name</td></tr>
*
* POI currently targets BIFF8 (Excel 97-2003), so the following behaviour can be observed for
* this method:
- * <blockquote><table border="0" cellpadding="1" cellspacing="0"
- * summary="Notable cases.">
+ * <table>
+ * <caption>Notable cases</caption>
* <tr><th>Input </th>
* <th>Result </th></tr>
* <tr><td>"A", "1"</td><td>true</td></tr>
* <tr><td>"AAA", "1"</td><td>false</td></tr>
* <tr><td>"a", "111"</td><td>true</td></tr>
* <tr><td>"Sheet", "1"</td><td>false</td></tr>
- * </table></blockquote>
+ * </table>
*
* @param colStr a string of only letter characters
* @param rowStr a string of only digit characters
* Example return values:
* <table>
* <caption>Example return values</caption>
- * <tr><th align='left'>Result</th><th align='left'>Comment</th></tr>
+ * <tr><th>Result</th><th>Comment</th></tr>
* <tr><td>A1</td><td>Cell reference without sheet</td></tr>
* <tr><td>Sheet1!A1</td><td>Standard sheet name</td></tr>
* <tr><td>'O''Brien''s Sales'!A1' </td><td>Sheet name with special characters</td></tr>
*
* <p>
* Example return values:
- * <table border="0" cellpadding="1" cellspacing="0" summary="Example return values">
- * <tr><th align='left'>Result</th><th align='left'>Comment</th></tr>
+ * <table>
+ * <caption>Example return values</caption>
+ * <tr><th>Result</th><th>Comment</th></tr>
* <tr><td>A1</td><td>Cell reference without sheet</td></tr>
* <tr><td>Sheet1!A1</td><td>Standard sheet name</td></tr>
* <tr><td>'O''Brien''s Sales'!A1' </td><td>Sheet name with special characters</td></tr>
&& _colIndex == cr._colIndex
&& _isRowAbs == cr._isRowAbs
&& _isColAbs == cr._isColAbs
- && ((_sheetName == null)
- ? (cr._sheetName == null)
- : _sheetName.equals(cr._sheetName));
+ && Objects.equals(_sheetName, cr._sheetName);
}
@Override