Package io.keikai.range.impl
Class FindOptions
java.lang.Object
io.keikai.range.impl.FindOptions
Options for find and replace operations on a spreadsheet.
Supports search scope, direction, target (values/formulas/comments), case sensitivity, entire-cell matching, and regex patterns.
Usage example:
FindOptions options = FindOptions.defaults()
.scope(FindOptions.SearchScope.WORKBOOK)
.matchCase(true)
.lookIn(FindOptions.LookIn.FORMULAS);
- Since:
- 7.0.0
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumWhich aspect of the cell to search in.static enumThe direction of the search.static enumThe scope of the search. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic FindOptionsdefaults()Creates a new FindOptions with default settings.Sets the search direction.Returns the search direction.Returns which aspect of the cell to search in.getScope()Returns the search scope.booleanReturns whether the search is case-sensitive.booleanReturns whether to match the entire cell content.booleanReturns whether regex is used for matching.lookIn(FindOptions.LookIn lookIn) Sets which aspect of the cell to search in.matchCase(boolean mc) Sets whether the search is case-sensitive.matchEntireCell(boolean mec) Sets whether to match the entire cell content.scope(FindOptions.SearchScope scope) Sets the search scope.useRegex(boolean regex) Sets whether to use regex for matching.
-
Constructor Details
-
FindOptions
public FindOptions()
-
-
Method Details
-
defaults
Creates a new FindOptions with default settings.- Returns:
- a new FindOptions instance
-
scope
Sets the search scope.- Parameters:
scope- the search scope- Returns:
- this FindOptions for chaining
-
direction
Sets the search direction.- Parameters:
dir- the search direction- Returns:
- this FindOptions for chaining
-
lookIn
Sets which aspect of the cell to search in.- Parameters:
lookIn- the look-in target- Returns:
- this FindOptions for chaining
-
matchCase
Sets whether the search is case-sensitive.- Parameters:
mc- true for case-sensitive search- Returns:
- this FindOptions for chaining
-
matchEntireCell
Sets whether to match the entire cell content.- Parameters:
mec- true to match entire cell content- Returns:
- this FindOptions for chaining
-
useRegex
Sets whether to use regex for matching.- Parameters:
regex- true to use regex- Returns:
- this FindOptions for chaining
-
getScope
Returns the search scope.- Returns:
- the search scope
-
getDirection
Returns the search direction.- Returns:
- the search direction
-
getLookIn
Returns which aspect of the cell to search in.- Returns:
- the look-in target
-
isMatchCase
public boolean isMatchCase()Returns whether the search is case-sensitive.- Returns:
- true if case-sensitive
-
isMatchEntireCell
public boolean isMatchEntireCell()Returns whether to match the entire cell content.- Returns:
- true if matching entire cell
-
isUseRegex
public boolean isUseRegex()Returns whether regex is used for matching.- Returns:
- true if using regex
-