Package com.independentsoft.office.spreadsheet

# Class FindOptions

java.lang.Object
com.independentsoft.office.spreadsheet.FindOptions

public class FindOptions extends Object
Specifies how the find and replace methods of the `Workbook` match text.

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `FindOptions()`
  Initializes a new instance of the `FindOptions` class.
  `FindOptions​(int scope)`
  Initializes a new instance of the `FindOptions` class with the specified scope.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `FindOptions`
  `clone()`
  Creates a new `FindOptions` that is a copy of the current object.
  `int`
  `getMaxResults()`
  Gets the maximum number of results.
  `int`
  `getScope()`
  Gets the parts of the document to search.
  `boolean`
  `isMatchCase()`
  Gets a value that indicates whether the search is case sensitive.
  `boolean`
  `isPreserveFormatting()`
  Gets a value that indicates whether replaced content inherits the formatting of the replaced content.
  `boolean`
  `isUseRegularExpressions()`
  Gets a value that indicates whether the search text is a regular expression.
  `boolean`
  `isUseWildcards()`
  Gets a value that indicates whether the search text contains wildcards (*, ? and [ ]).
  `boolean`
  `isWholeWord()`
  Gets a value that indicates whether only whole words are matched.
  `void`
  `setMatchCase​(boolean matchCase)`
  Sets a value that indicates whether the search is case sensitive.
  `void`
  `setMaxResults​(int maxResults)`
  Sets the maximum number of results.
  `void`
  `setPreserveFormatting​(boolean preserveFormatting)`
  Sets a value that indicates whether replaced content inherits the formatting of the replaced content.
  `void`
  `setScope​(int scope)`
  Sets the parts of the document to search.
  `void`
  `setUseRegularExpressions​(boolean useRegularExpressions)`
  Sets a value that indicates whether the search text is a regular expression.
  `void`
  `setUseWildcards​(boolean useWildcards)`
  Sets a value that indicates whether the search text contains wildcards (*, ? and [ ]).
  `void`
  `setWholeWord​(boolean wholeWord)`
  Sets a value that indicates whether only whole words are matched.

  ### Methods inherited from class java.lang.Object

  `equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Constructor Details

  - ### FindOptions

    public FindOptions()
    Initializes a new instance of the `FindOptions` class.

  - ### FindOptions

    public FindOptions​(int scope)
    Initializes a new instance of the `FindOptions` class with the specified scope.
    Parameters:
      `scope` - the parts of the document to search

- ## Method Details

  - ### clone

    public FindOptions clone()
    Creates a new `FindOptions` that is a copy of the current object.
    Overrides:
      `clone` in class `Object`
    Returns:
      a new `FindOptions` that is a copy of the current object

  - ### isMatchCase

    public boolean isMatchCase()
    Gets a value that indicates whether the search is case sensitive. The default value is true.
    Returns:
      true, if the search is case sensitive

  - ### setMatchCase

    public void setMatchCase​(boolean matchCase)
    Sets a value that indicates whether the search is case sensitive. The default value is true.
    Parameters:
      `matchCase` - true, if the search is case sensitive

  - ### isWholeWord

    public boolean isWholeWord()
    Gets a value that indicates whether only whole words are matched. The default value is false.
    Returns:
      true, if only whole words are matched

  - ### setWholeWord

    public void setWholeWord​(boolean wholeWord)
    Sets a value that indicates whether only whole words are matched. The default value is false.
    Parameters:
      `wholeWord` - true, if only whole words are matched

  - ### isUseRegularExpressions

    public boolean isUseRegularExpressions()
    Gets a value that indicates whether the search text is a regular expression. The default value is false. Group references such as $1 are substituted in the replacement text.
    Returns:
      true, if the search text is a regular expression

  - ### setUseRegularExpressions

    public void setUseRegularExpressions​(boolean useRegularExpressions)
    Sets a value that indicates whether the search text is a regular expression. The default value is false. Group references such as $1 are substituted in the replacement text.
    Parameters:
      `useRegularExpressions` - true, if the search text is a regular expression

  - ### isUseWildcards

    public boolean isUseWildcards()
    Gets a value that indicates whether the search text contains wildcards (*, ? and [ ]). The default value is false.
    Returns:
      true, if the search text contains wildcards

  - ### setUseWildcards

    public void setUseWildcards​(boolean useWildcards)
    Sets a value that indicates whether the search text contains wildcards (*, ? and [ ]). The default value is false.
    Parameters:
      `useWildcards` - true, if the search text contains wildcards

  - ### isPreserveFormatting

    public boolean isPreserveFormatting()
    Gets a value that indicates whether replaced content inherits the formatting of the replaced content. The default value is true.
    Returns:
      true, if replaced content inherits the formatting of the replaced content

  - ### setPreserveFormatting

    public void setPreserveFormatting​(boolean preserveFormatting)
    Sets a value that indicates whether replaced content inherits the formatting of the replaced content. The default value is true.
    Parameters:
      `preserveFormatting` - true, if replaced content inherits the formatting of the replaced content

  - ### getScope

    public int getScope()
    Gets the parts of the document to search. The default value is `SearchScope.ALL`.
    Returns:
      the parts of the document to search

  - ### setScope

    public void setScope​(int scope)
    Sets the parts of the document to search. The default value is `SearchScope.ALL`.
    Parameters:
      `scope` - the parts of the document to search

  - ### getMaxResults

    public int getMaxResults()
    Gets the maximum number of results. Zero, the default value, means no limit.
    Returns:
      the maximum number of results

  - ### setMaxResults

    public void setMaxResults​(int maxResults)
    Sets the maximum number of results. Zero, the default value, means no limit.
    Parameters:
      `maxResults` - the maximum number of results