public class MatchEvent extends SearchResultEvent
Match
es 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.
|
getSearchResult
getSource, toString
public 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 REMOVED
public Match[] getMatches()
protected void setKind(int kind)
kind
- the kind to set; either ADDED
or REMOVED
protected void setMatch(Match match)
match
- the match to setprotected void setMatches(Match[] matches)
matches
- the matches to set
Copyright (c) 2000, 2014 Eclipse Contributors and others. All rights reserved.Guidelines for using Eclipse APIs.