/** * Extracts updated elements from the given match * * @param match */ protected void registerUpdate(IPatternMatch match) { IQuerySpecification<? extends IncQueryMatcher<? extends IPatternMatch>> specification = match.specification(); Collection<IPatternMatch> updateMatches = updateAccumulator .get((IQuerySpecification<? extends IncQueryMatcher<IPatternMatch>>) specification); updateMatches.add(match); }
/** * Extracts appeared elements from the given match * * @param match */ protected void registerAppear(IPatternMatch match) { IQuerySpecification<? extends IncQueryMatcher<? extends IPatternMatch>> specification = match.specification(); Collection<IPatternMatch> appearMatches = appearAccumulator .get((IQuerySpecification<? extends IncQueryMatcher<IPatternMatch>>) specification); appearMatches.add(match); }
/** * Extracts disappeared elements from the given match * * @param match */ protected void registerDisappear(IPatternMatch match) { IQuerySpecification<? extends IncQueryMatcher<? extends IPatternMatch>> specification = match.specification(); Collection<IPatternMatch> appearMatches = appearAccumulator .get((IQuerySpecification<? extends IncQueryMatcher<IPatternMatch>>) specification); Collection<IPatternMatch> updateMatches = updateAccumulator .get((IQuerySpecification<? extends IncQueryMatcher<IPatternMatch>>) specification); Collection<IPatternMatch> disappearMatches = disappearAccumulator .get((IQuerySpecification<? extends IncQueryMatcher<IPatternMatch>>) specification); if (updateMatches.contains(match)) updateMatches.remove(match); if (appearMatches.contains(match)){ appearMatches.remove(match); }else{ disappearMatches.add(match); } } }