## org.gjt.sp.jedit.search
Class SearchMatcher

    java.lang.Object
      org.gjt.sp.jedit.search.SearchMatcher

Direct Known Subclasses:
  BoyerMooreSearchMatcher, PatternSearchMatcher

    public abstract class SearchMatcher

extends java.lang.Object

An abstract class for matching strings.

Nested Class Summary
`static class` `SearchMatcher.Match`

Field Summary
`protected SearchMatcher.Match` `returnValue`

Constructor Summary
`SearchMatcher()`

Method Summary
`boolean` `isMatchingEOL()` Returns whether the matcher is matching the end of the line character.
`abstract SearchMatcher.Match` `nextMatch(java.lang.CharSequence text, boolean start, boolean end, boolean firstTime, boolean reverse)` Returns the offset of the first match of the specified text within this matcher.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### returnValue

    protected SearchMatcher.Match returnValue

Constructor Detail

### SearchMatcher

    public SearchMatcher()

Method Detail

### nextMatch

    public abstract SearchMatcher.Match nextMatch(java.lang.CharSequence text,
                                                  boolean start,
                                                  boolean end,
                                                  boolean firstTime,
                                                  boolean reverse)

  Returns the offset of the first match of the specified text within this matcher.

  Parameters:
    `text` - The text to search in
    `start` - True if the start of the segment is the beginning of the buffer
    `end` - True if the end of the segment is the end of the buffer
    `firstTime` - If false and the search string matched at the start offset with length zero, automatically find next match
    `reverse` - If true, searching will be performed in a backward direction.
  Returns:
    an array where the first element is the start offset of the match, and the second element is the end offset of the match
  Since:
    jEdit 4.3pre5

### isMatchingEOL

    public boolean isMatchingEOL()

  Returns whether the matcher is matching the end of the line character. This should be used to adjust the matched region size when matching the end-of-line character, since it's not included in the matched region returned by the java.util.regex.Pattern matcher.

  Returns:
    Whether the end of the match region will be the EOL character.
  Since:
    jEdit 4.3pre7