tmf: Annotate methods in ITmfEventField
[deliverable/tracecompass.git] / tmf / org.eclipse.tracecompass.tmf.core / src / org / eclipse / tracecompass / tmf / core / parsers / custom / CustomEventContent.java
1 /*******************************************************************************
2 * Copyright (c) 2010, 2014 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.tracecompass.tmf.core.parsers.custom;
14
15 import org.eclipse.jdt.annotation.NonNull;
16 import org.eclipse.tracecompass.tmf.core.event.ITmfEventField;
17 import org.eclipse.tracecompass.tmf.core.event.TmfEventField;
18
19 /**
20 * Event content for custom text parsers
21 *
22 * @author Patrick Tassé
23 */
24 public class CustomEventContent extends TmfEventField {
25
26 /**
27 * Constructor.
28 *
29 * @param parent
30 * Parent event
31 * @param content
32 * Event content
33 */
34 public CustomEventContent(CustomEvent parent, StringBuffer content) {
35 super(ITmfEventField.ROOT_FIELD_ID, content, null);
36 }
37
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(@NonNull String name, Object content, ITmfEventField[] fields) {
49 super(name, content, fields);
50 }
51
52 @Override
53 public int hashCode() {
54 return super.hashCode();
55 }
56
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 }
70 }
This page took 0.032338 seconds and 5 git commands to generate.