Fix Sonar findings in TmfEvent
[deliverable/tracecompass.git] / org.eclipse.linuxtools.tmf.core / src / org / eclipse / linuxtools / tmf / core / event / ITmfEventField.java
1 /*******************************************************************************
2 * Copyright (c) 2012 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.core.event;
14
15
16 /**
17 * The TMF event payload structure. Each field can be either a terminal or
18 * further decomposed into subfields.
19 *
20 * @since 1.0
21 * @version 1.0
22 * @author Francois Chouinard
23 *
24 * @see TmfEventField
25 * @see ITmfEvent
26 */
27 public interface ITmfEventField extends Cloneable {
28
29 // ------------------------------------------------------------------------
30 // Constants
31 // ------------------------------------------------------------------------
32
33 /**
34 * The root field id (the main container)
35 */
36 public static final String ROOT_FIELD_ID = ":root:"; //$NON-NLS-1$
37
38 // ------------------------------------------------------------------------
39 // Getters
40 // ------------------------------------------------------------------------
41
42 /**
43 * @return the field name
44 */
45 public String getName();
46
47 /**
48 * @return the field value
49 */
50 public Object getValue();
51
52 /**
53 * @return the list of subfield names (empty if none)
54 */
55 public String[] getFieldNames();
56
57 /**
58 * @return the nth field name (null if absent or inexistent)
59 */
60 public String getFieldName(int index);
61
62 /**
63 * @return the list of subfields (null if none)
64 */
65 public ITmfEventField[] getFields();
66
67 /**
68 * @return a specific subfield by name (null if absent or inexistent)
69 */
70 public ITmfEventField getField(String name);
71
72 /**
73 * @return a specific subfield by index (null if absent or inexistent)
74 */
75 public ITmfEventField getField(int index);
76
77 // ------------------------------------------------------------------------
78 // Cloneable
79 // ------------------------------------------------------------------------
80
81 /**
82 * @return a clone of the event type
83 */
84 public ITmfEventField clone();
85
86 }
This page took 0.031483 seconds and 5 git commands to generate.