public class MatchEvent extends SearchResultEvent
Matches are added or removed from an
AbstractTextSearchResult.
Clients may instantiate or subclass this class.
| Modifier and Type | Field and Description |
|---|---|
static int |
ADDED
Constant for a matches being added.
|
static int |
REMOVED
Constant for a matches being removed.
|
source| Constructor and Description |
|---|
MatchEvent(ISearchResult searchResult)
Constructs a new
MatchEvent. |
| Modifier and Type | Method and Description |
|---|---|
int |
getKind()
Tells whether this is a remove or an add.
|
Match[] |
getMatches()
Returns the concerned matches.
|
protected void |
setKind(int kind)
Sets the kind of event this is.
|
protected void |
setMatch(Match match)
Sets the match for the change this event reports.
|
protected void |
setMatches(Match[] matches)
Sets the matches for the change this event reports.
|
getSearchResultgetSource, toStringpublic static final int ADDED
getKind(),
Constant Field Valuespublic static final int REMOVED
getKind(),
Constant Field Valuespublic MatchEvent(ISearchResult searchResult)
MatchEvent.searchResult - the search result concernedpublic int getKind()
ADDED or REMOVEDpublic Match[] getMatches()
protected void setKind(int kind)
kind - the kind to set; either ADDED or REMOVEDprotected void setMatch(Match match)
match - the match to setprotected void setMatches(Match[] matches)
matches - the matches to setGuidelines for using Eclipse APIs. Copyright (c) IBM Corp. and others 2000, 2006. All rights reserved.