Move alltests plugin to the Trace Compass namespace
[deliverable/tracecompass.git] / org.eclipse.tracecompass.tmf.core / src / org / eclipse / linuxtools / tmf / core / parsers / custom / CustomEventContent.java
CommitLineData
a0a88f65 1/*******************************************************************************
60ae41e1 2 * Copyright (c) 2010, 2014 Ericsson
a0a88f65
AM
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 * Patrick Tassé - Initial API and implementation
11 *******************************************************************************/
12
47aafe74 13package org.eclipse.linuxtools.tmf.core.parsers.custom;
be222f56
PT
14
15import org.eclipse.linuxtools.tmf.core.event.ITmfEventField;
16import org.eclipse.linuxtools.tmf.core.event.TmfEventField;
17
a0a88f65
AM
18/**
19 * Event content for custom text parsers
20 *
21 * @author Patrick Tassé
47aafe74 22 * @since 3.0
a0a88f65 23 */
be222f56
PT
24public class CustomEventContent extends TmfEventField {
25
a0a88f65
AM
26 /**
27 * Constructor.
28 *
29 * @param parent
30 * Parent event
31 * @param content
32 * Event content
33 */
be222f56 34 public CustomEventContent(CustomEvent parent, StringBuffer content) {
214cc822 35 super(ITmfEventField.ROOT_FIELD_ID, content, null);
be222f56
PT
36 }
37
80349bf7
AM
38 /**
39 * Create a new event field with sub-fields.
40 *
41 * @param name
42 * Field name
43 * @param content
44 * Event content
45 * @param fields
46 * The array of sub-fields
47 */
48 public CustomEventContent(String name, Object content, ITmfEventField[] fields) {
49 super(name, content, fields);
50 }
51
be222f56
PT
52 @Override
53 public int hashCode() {
54 return super.hashCode();
55 }
56
be222f56
PT
57 @Override
58 public boolean equals(Object obj) {
59 if (this == obj) {
60 return true;
61 }
62 if (!super.equals(obj)) {
63 return false;
64 }
65 if (!(obj instanceof CustomEventContent)) {
66 return false;
67 }
68 return true;
69 }
be222f56 70}
This page took 0.050432 seconds and 5 git commands to generate.