com.groupdocs.parser

Interfaces

Classes

Exceptions

com.groupdocs.parser

Class SearchOptions



  • public final class SearchOptions
    extends Object

    Provides the options for search.

    • Field Detail

      • EMPTY

        public static final SearchOptions EMPTY

        Gets an empty instance.

    • Constructor Detail

      • SearchOptions

        public SearchOptions(SearchHighlightOptions highlightOptions)

        Initializes a new instance of the SearchOptions class.

        Parameters:
        highlightOptions - Options of highlight.
      • SearchOptions

        public SearchOptions(SearchHighlightOptions highlightOptions,
                     boolean isCaseSensitive)

        Initializes a new instance of the SearchOptions class.

        Parameters:
        highlightOptions - Options of highlight.
        isCaseSensitive - A value indicating whether search is case sensitive.
      • SearchOptions

        public SearchOptions(SearchHighlightOptions highlightOptions,
                     boolean isCaseSensitive,
                     boolean isWholeWord)

        Initializes a new instance of the SearchOptions class.

        Parameters:
        highlightOptions - Options of highlight.
        isCaseSensitive - A value indicating whether search is case sensitive.
        isWholeWord - A value indicating whether the search matches only the whole word.
      • SearchOptions

        public SearchOptions(SearchHighlightOptions highlightOptions,
                     boolean isCaseSensitive,
                     boolean isWholeWord,
                     WordSeparators wordSeparators)

        Initializes a new instance of the SearchOptions class.

        Parameters:
        highlightOptions - Options of highlight.
        isCaseSensitive - A value indicating whether search is case sensitive.
        isWholeWord - A value indicating whether the search matches only the whole word.
        wordSeparators - An instance of WordSeparators.
    • Method Detail

      • getHighlightOptions

        public SearchHighlightOptions getHighlightOptions()

        Gets options of highlight.

        Returns:
        A size of highlight.
      • isCaseSensitive

        public boolean isCaseSensitive()

        Gets a value indicating whether search is case sensitive.

        Returns:
        A boolean true if search is case sensitive; otherwise, false.
      • isWholeWord

        public boolean isWholeWord()

        Gets a value indicating whether the search matches only the whole word.

        Returns:
        A boolean true if the search matches only the whole word; otherwise, false.
      • getWordSeparators

        public WordSeparators getWordSeparators()

        Gets an instance of WordSeparators which is used to check separator characters.

        Returns:
        An instance of WordSeparators.
      • createLeftHighlightOptions

        public HighlightOptions createLeftHighlightOptions(int position)

        Creates an instance of HighlightOptions for the left highlight.

        Parameters:
        position - A zero-based position of found text.
        Returns:
        An instance of HighlightOptions for the left highlight.
      • createRightHighlightOptions

        public HighlightOptions createRightHighlightOptions(int position)

        Creates an instance of HighlightOptions for the right highlight.

        Parameters:
        position - The zero-based position of the found text.
        Returns:
        An instance of HighlightOptions for the right highlight.