Fix Sonar findings in TmfEvent
[deliverable/tracecompass.git] / org.eclipse.linuxtools.tmf.core / src / org / eclipse / linuxtools / tmf / core / event / ITmfEventField.java
CommitLineData
5179fc01
FC
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
13package org.eclipse.linuxtools.tmf.core.event;
14
b9e37ffd 15
5179fc01 16/**
4c564a2d
FC
17 * The TMF event payload structure. Each field can be either a terminal or
18 * further decomposed into subfields.
b9e37ffd
FC
19 *
20 * @since 1.0
21 * @version 1.0
22 * @author Francois Chouinard
23 *
24 * @see TmfEventField
25 * @see ITmfEvent
5179fc01 26 */
7636a88e 27public interface ITmfEventField extends Cloneable {
5179fc01 28
a4115405
FC
29 // ------------------------------------------------------------------------
30 // Constants
31 // ------------------------------------------------------------------------
32
4c564a2d
FC
33 /**
34 * The root field id (the main container)
35 */
a4115405 36 public static final String ROOT_FIELD_ID = ":root:"; //$NON-NLS-1$
085d898f 37
a4115405
FC
38 // ------------------------------------------------------------------------
39 // Getters
40 // ------------------------------------------------------------------------
41
5179fc01 42 /**
d7dbf09a 43 * @return the field name
5179fc01 44 */
4c564a2d 45 public String getName();
5179fc01
FC
46
47 /**
48 * @return the field value
49 */
50 public Object getValue();
51
52 /**
75d42a16 53 * @return the list of subfield names (empty if none)
4c564a2d
FC
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 /**
75d42a16 63 * @return the list of subfields (null if none)
4c564a2d
FC
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)
5179fc01 74 */
4c564a2d 75 public ITmfEventField getField(int index);
5179fc01 76
a4115405
FC
77 // ------------------------------------------------------------------------
78 // Cloneable
79 // ------------------------------------------------------------------------
80
7636a88e 81 /**
82 * @return a clone of the event type
83 */
cbbcc354 84 public ITmfEventField clone();
7636a88e 85
5179fc01 86}
This page took 0.035265 seconds and 5 git commands to generate.