(no commit message)
[deliverable/tracecompass.git] / org.eclipse.linuxtools.tmf.tests / stubs / org / eclipse / linuxtools / tmf / event / TmfEventContentStub.java
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:
10 * Francois Chouinard - Initial API and implementation
11 *******************************************************************************/
12
13 package org.eclipse.linuxtools.tmf.event;
14
15 /**
16 * <b><u>TmfEventContentStub</u></b>
17 * <p>
18 * TODO: Implement me. Please.
19 */
20 public class TmfEventContentStub extends TmfEventContent {
21
22 public TmfEventContentStub(TmfEvent parent, Object content) {
23 super(parent, content);
24 }
25
26 public TmfEventContentStub(TmfEventContentStub other) {
27 super(other);
28 }
29
30 @Override
31 protected void parseContent() {
32 Object field1 = new Integer(1);
33 Object field2 = new Integer(-10);
34 Object field3 = new Boolean(true);
35 Object field4 = new String("some string");
36 Object field5 = new TmfTimestamp(1, (byte) 2, 3);
37 fFields = new Object[] { field1, field2, field3, field4, field5 };
38 }
39
40 @Override
41 public TmfEventContent clone() {
42 TmfEventContentStub content = new TmfEventContentStub(this);
43 content.fRawContent = "Some content";
44 content.fFields = null;
45 return content;
46 }
47
48 // @Override
49 // public String toString() {
50 // Object[] fields = getFields();
51 // StringBuilder result = new StringBuilder("[TmfEventContent(");
52 // for (int i = 0; i < fields.length; i++) {
53 // if (i > 0) result.append(",");
54 // result.append(fields[i]);
55 // }
56 // result.append(")]");
57 // return result.toString();
58 // }
59 }
This page took 0.033717 seconds and 6 git commands to generate.