/** * Removes the given matches from this search result. This method has no effect for matches that * are not found * * <p>Subclasses may extend this method. * * @param matches the matches to remove */ public void removeMatches(Match[] matches) { Collection existing = new ArrayList(); synchronized (fElementsToMatches) { for (int i = 0; i < matches.length; i++) { if (doRemoveMatch(matches[i])) existing.add(matches[i]); // no duplicate matches at this point } } if (!existing.isEmpty()) fireChange(getSearchResultEvent(existing, MatchEvent.REMOVED)); }
/** * Removes the given matches from this search result. This method has no * effect for matches that are not found * <p> * Subclasses may extend this method. * </p> * * @param matches the matches to remove */ public void removeMatches(Match[] matches) { Collection existing= new ArrayList(); synchronized (fElementsToMatches) { for (int i = 0; i < matches.length; i++) { if (doRemoveMatch(matches[i])) existing.add(matches[i]); // no duplicate matches at this point } } if (!existing.isEmpty()) fireChange(getSearchResultEvent(existing, MatchEvent.REMOVED)); }
/** * Removes the given matches from this search result. This method has no * effect for matches that are not found * <p> * Subclasses may extend this method. * </p> * * @param matches the matches to remove */ public void removeMatches(Match[] matches) { Collection<Match> existing= new ArrayList<>(); synchronized (fElementsToMatches) { for (Match match : matches) { if (doRemoveMatch(match)) existing.add(match); // no duplicate matches at this point } } if (!existing.isEmpty()) fireChange(getSearchResultEvent(existing, MatchEvent.REMOVED)); }
/** * Removes the given match from this search result. This method has no effect if the match is not * found. * * <p>Subclasses may extend this method. * * @param match the match to remove */ public void removeMatch(Match match) { boolean existed = false; synchronized (fElementsToMatches) { existed = doRemoveMatch(match); } if (existed) fireChange(getSearchResultEvent(match, MatchEvent.REMOVED)); }
/** * Removes the given match from this search result. This method has no * effect if the match is not found. * <p> * Subclasses may extend this method. * </p> * @param match the match to remove */ public void removeMatch(Match match) { boolean existed= false; synchronized (fElementsToMatches) { existed= doRemoveMatch(match); } if (existed) fireChange(getSearchResultEvent(match, MatchEvent.REMOVED)); }
/** * Removes the given match from this search result. This method has no * effect if the match is not found. * <p> * Subclasses may extend this method. * </p> * @param match the match to remove */ public void removeMatch(Match match) { boolean existed= false; synchronized (fElementsToMatches) { existed= doRemoveMatch(match); } if (existed) fireChange(getSearchResultEvent(match, MatchEvent.REMOVED)); }