1 /*******************************************************************************
2 * Copyright (c) 2009 Ericsson
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
10 * Francois Chouinard - Initial API and implementation
11 *******************************************************************************/
13 package org
.eclipse
.linuxtools
.tmf
.event
;
16 * <b><u>TmfEventContent</u></b>
20 public class TmfEventContent
{
22 // ========================================================================
24 // ========================================================================
26 private final TmfEventFormat fFormat
;
27 private final String fContent
;
28 private final int fNbFields
;
29 private TmfEventField
[] fFields
= null;
31 // ========================================================================
33 // ========================================================================
39 public TmfEventContent(Object content
, TmfEventFormat format
) {
41 fContent
= content
.toString();
42 fNbFields
= fFormat
.getLabels().length
;
45 // ========================================================================
47 // ========================================================================
52 public String
getContent() {
59 public TmfEventFormat
getFormat() {
66 public int getNbFields() {
73 public TmfEventField
[] getFields() {
74 if (fFields
== null) {
75 fFields
= fFormat
.parse(fContent
);
84 public TmfEventField
getField(int id
) {
85 assert id
>= 0 && id
< fNbFields
;
86 if (fFields
== null) {
87 fFields
= fFormat
.parse(fContent
);
95 public void setFields(TmfEventField
[] fields
) {
This page took 0.033058 seconds and 6 git commands to generate.