1 /*******************************************************************************
2 * Copyright (c) 2013, 2014 École Polytechnique de Montréal
4 * All rights reserved. This program and the accompanying materials are made
5 * available under the terms of the Eclipse Public License v1.0 which
6 * accompanies this distribution, and is available at
7 * http://www.eclipse.org/legal/epl-v10.html
10 * Geneviève Bastien - Initial implementation and API
11 *******************************************************************************/
13 package org
.eclipse
.tracecompass
.tmf
.core
.event
.matching
;
15 import java
.util
.Collection
;
17 import org
.eclipse
.tracecompass
.tmf
.core
.trace
.ITmfTrace
;
20 * Class that does something with a match.
22 * This default implementation of the class just counts the matches
24 * @author Geneviève Bastien
26 public class TmfEventMatches
implements IMatchProcessingUnit
{
28 private int fMatchCount
;
33 public TmfEventMatches() {
38 * IMatchProcessingUnit overrides
41 public void init(Collection
<ITmfTrace
> fTraces
) {
46 public void addMatch(TmfEventDependency match
) {
51 public void matchingEnded() {
56 public int countMatches() {
61 * Returns the match at the specified index
64 * The index of the match to get
65 * @return The match at index or null or not present
66 * @deprecated Matches are not kept anymore, they use up memory for no real reason
69 public TmfEventDependency
getMatch(int index
) {
74 public String
toString() {
75 return getClass().getSimpleName() + " [ Number of matches found: " + fMatchCount
+ " ]"; //$NON-NLS-1$ //$NON-NLS-2$
This page took 0.033781 seconds and 5 git commands to generate.