public static class AbstractSearchable.SearchResult
extends java.lang.Object
NOTE: this is still in-flow, probably will take more responsibility/ or even change altogether on further factoring
Constructor and Description |
---|
SearchResult()
Instantiates an empty SearchResult.
|
SearchResult(java.util.regex.Pattern ex,
java.util.regex.MatchResult result,
int row,
int column)
Instantiates a SearchResult with the given state.
|
Modifier and Type | Method and Description |
---|---|
int |
getFoundColumn()
Returns the column index of the match position.
|
int |
getFoundRow()
Returns the row index of the match position.
|
java.util.regex.MatchResult |
getMatchResult()
Returns the MatchResult representing the current match.
|
java.util.regex.Pattern |
getPattern()
Returns the Pattern used for matching.
|
java.lang.String |
getRegEx()
Returns the regex of the Pattern used for matching.
|
void |
reset()
Resets all internal state to no-match.
|
void |
resetFoundColumn()
Resets the column to OFF.
|
void |
updateFrom(AbstractSearchable.SearchResult searchResult)
Sets internal state to the same as the given SearchResult.
|
public SearchResult()
public SearchResult(java.util.regex.Pattern ex, java.util.regex.MatchResult result, int row, int column)
ex
- the Pattern used for matchingresult
- the current MatchResultrow
- the row index of the current matchcolumn
- the column index of the current matchpublic void updateFrom(AbstractSearchable.SearchResult searchResult)
searchResult
- the SearchResult to copy internal state from.public java.lang.String getRegEx()
public void reset()
public void resetFoundColumn()
public int getFoundColumn()
public int getFoundRow()
public java.util.regex.MatchResult getMatchResult()
public java.util.regex.Pattern getPattern()