Class MatchEvent

All Implemented Interfaces:
Serializable

public class MatchEvent extends SearchResultEvent
An event object describing addition and removal of matches. Events of this class are sent when Matches are added or removed from an AbstractTextSearchResult.

Clients may instantiate or subclass this class.

Since:
3.0
See Also:
  • Field Details

  • Constructor Details

    • MatchEvent

      public MatchEvent(ISearchResult searchResult)
      Constructs a new MatchEvent.
      Parameters:
      searchResult - the search result concerned
  • Method Details

    • getKind

      public int getKind()
      Tells whether this is a remove or an add.
      Returns:
      one of ADDED or REMOVED
    • getMatches

      public Match[] getMatches()
      Returns the concerned matches.
      Returns:
      the matches this event is about
    • setKind

      protected void setKind(int kind)
      Sets the kind of event this is.
      Parameters:
      kind - the kind to set; either ADDED or REMOVED
    • setMatch

      protected void setMatch(Match match)
      Sets the match for the change this event reports.
      Parameters:
      match - the match to set
    • setMatches

      protected void setMatches(Match[] matches)
      Sets the matches for the change this event reports.
      Parameters:
      matches - the matches to set