ctf: Fix lost events in a more elegant way
[deliverable/tracecompass.git] / org.eclipse.linuxtools.tmf.core / src / org / eclipse / linuxtools / tmf / core / ctfadaptor / CtfTmfContent.java
1 /*******************************************************************************
2 * Copyright (c) 2012 Ericsson
3 *
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
8 *
9 * Contributors: Matthew Khouzam - Initial API and implementation
10 *******************************************************************************/
11 package org.eclipse.linuxtools.tmf.core.ctfadaptor;
12
13 import org.eclipse.linuxtools.tmf.core.event.ITmfEventField;
14 import org.eclipse.linuxtools.tmf.core.event.TmfEventField;
15
16 /**
17 * A wrapper to allow pretty printing of the CtfTmfEvent fields
18 *
19 * @version 1.0
20 * @author Matthew Khouzam
21 */
22 public class CtfTmfContent extends TmfEventField {
23
24 /**
25 * Constructor for CtfTmfContent.
26 * @param name String
27 * @param fields ITmfEventField[]
28 */
29 public CtfTmfContent(String name, ITmfEventField[] fields) {
30 super(name, fields);
31 }
32
33 /*
34 * (non-Javadoc)
35 *
36 * @see java.lang.Object#toString()
37 */
38 @Override
39 public String toString() {
40 StringBuilder retVal = new StringBuilder();
41 for( int i=0; i < getFields().length;i++){
42 ITmfEventField field = getFields()[i];
43 if(i != 0) {
44 retVal.append(", ");//$NON-NLS-1$
45 }
46 retVal.append(field.toString());
47 }
48 return retVal.toString();
49 }
50 }
This page took 0.030879 seconds and 5 git commands to generate.