Class FindOptions

java.lang.Object
io.keikai.range.impl.FindOptions

public class FindOptions extends Object
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
  • Constructor Details

    • FindOptions

      public FindOptions()
  • Method Details

    • defaults

      public static FindOptions defaults()
      Creates a new FindOptions with default settings.
      Returns:
      a new FindOptions instance
    • scope

      public FindOptions scope(FindOptions.SearchScope scope)
      Sets the search scope.
      Parameters:
      scope - the search scope
      Returns:
      this FindOptions for chaining
    • direction

      public FindOptions direction(FindOptions.SearchDirection dir)
      Sets the search direction.
      Parameters:
      dir - the search direction
      Returns:
      this FindOptions for chaining
    • lookIn

      public FindOptions lookIn(FindOptions.LookIn lookIn)
      Sets which aspect of the cell to search in.
      Parameters:
      lookIn - the look-in target
      Returns:
      this FindOptions for chaining
    • matchCase

      public FindOptions matchCase(boolean mc)
      Sets whether the search is case-sensitive.
      Parameters:
      mc - true for case-sensitive search
      Returns:
      this FindOptions for chaining
    • matchEntireCell

      public FindOptions matchEntireCell(boolean mec)
      Sets whether to match the entire cell content.
      Parameters:
      mec - true to match entire cell content
      Returns:
      this FindOptions for chaining
    • useRegex

      public FindOptions useRegex(boolean regex)
      Sets whether to use regex for matching.
      Parameters:
      regex - true to use regex
      Returns:
      this FindOptions for chaining
    • getScope

      public FindOptions.SearchScope getScope()
      Returns the search scope.
      Returns:
      the search scope
    • getDirection

      public FindOptions.SearchDirection getDirection()
      Returns the search direction.
      Returns:
      the search direction
    • getLookIn

      public FindOptions.LookIn 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