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
CommitLineData
b1baa808
MK
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 *******************************************************************************/
ce2388e0
FC
11package org.eclipse.linuxtools.tmf.core.ctfadaptor;
12
13import org.eclipse.linuxtools.tmf.core.event.ITmfEventField;
14import org.eclipse.linuxtools.tmf.core.event.TmfEventField;
15
b1baa808 16/**
d09f973b
FC
17 * A wrapper to allow pretty printing of the CtfTmfEvent fields
18 *
19 * @version 1.0
20 * @author Matthew Khouzam
b1baa808 21 */
ce2388e0
FC
22public class CtfTmfContent extends TmfEventField {
23
b1baa808
MK
24 /**
25 * Constructor for CtfTmfContent.
26 * @param name String
27 * @param fields ITmfEventField[]
28 */
ce2388e0
FC
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();
05deaf83
MK
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 }
33656d8e 46 retVal.append(field.toString());
ce2388e0
FC
47 }
48 return retVal.toString();
49 }
50}
This page took 0.030977 seconds and 5 git commands to generate.