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