[292393] Revisited header search function
[deliverable/tracecompass.git] / org.eclipse.linuxtools.tmf / src / org / eclipse / linuxtools / tmf / event / TmfEventFormat.java
CommitLineData
4ab33d2b
AO
1/*******************************************************************************
2 * Copyright (c) 2009 Ericsson
3 *
4 * All rights reserved. This program and the accompanying materials are
5 * made 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:
1f506a43 10 * Francois Chouinard - Initial API and implementation
4ab33d2b
AO
11 *******************************************************************************/
12
13package org.eclipse.linuxtools.tmf.event;
14
15/**
16 * <b><u>TmfEventFormat</u></b>
17 * <p>
18 * The basic event content format.
19 */
20public class TmfEventFormat implements ITmfContentParser {
21
22 // ========================================================================
23 // Attributes
24 // ========================================================================
25
26 private final String[] fLabels;
27
28 // ========================================================================
29 // Constructors
30 // ========================================================================
31
32 /**
33 *
34 */
35 public TmfEventFormat() {
36 this(new String[] { "Content" });
37 }
38
39 /**
40 * @param labels
41 */
42 public TmfEventFormat(String[] labels) {
43 fLabels = labels;
44 }
45
46 // ========================================================================
47 // Accessors
48 // ========================================================================
49
50 /**
51 * @return
52 */
53 public String[] getLabels() {
54 return fLabels;
55 }
56
57 // ========================================================================
58 // Operators
59 // ========================================================================
60
61 /**
62 * The default content parser: returns a single field containing the whole
63 * content.
64 *
65 * @param content
66 * @return
67 */
68 public TmfEventField[] parse(Object content) {
69 return new TmfEventField[] { new TmfEventField(content.toString()) };
70 }
1f506a43 71
4ab33d2b 72}
This page took 0.025955 seconds and 5 git commands to generate.