tmf/lttng: Remove unneeded (non-Javadoc) comments
[deliverable/tracecompass.git] / org.eclipse.linuxtools.tmf.core / src / org / eclipse / linuxtools / tmf / core / statevalue / ITmfStateValue.java
1 /*******************************************************************************
2 * Copyright (c) 2012, 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 * Alexandre Montplaisir - Initial API
11 ******************************************************************************/
12
13 package org.eclipse.linuxtools.tmf.core.statevalue;
14
15 import org.eclipse.linuxtools.tmf.core.exceptions.StateValueTypeException;
16
17
18 /**
19 * This is the interface for using state values and reading their contents.
20 *
21 * @version 1.0
22 * @author Alexandre Montplaisir
23 */
24 public interface ITmfStateValue {
25
26 /**
27 * The supported types of state values
28 * @since 2.0
29 */
30 public enum Type {
31 /** Null value, for an interval not carrying any information */
32 NULL,
33 /** 32-bit integer value */
34 INTEGER,
35 /** Variable-length string value */
36 STRING,
37 /** 64-bit integer value */
38 LONG
39 }
40
41 /**
42 * Each implementation has to define which one (among the supported types)
43 * they implement. There could be more than one implementation of each type,
44 * depending on the needs of the different users.
45 *
46 * @return The ITmfStateValue.Type enum representing the type of this value
47 * @since 2.0
48 */
49 public Type getType();
50
51 /**
52 * Only "null values" should return true here
53 *
54 * @return True if this type of SV is considered "null", false if it
55 * contains a real value.
56 */
57 public boolean isNull();
58
59 /**
60 * Read the contained value as an 'int' primitive
61 *
62 * @return The integer contained in the state value
63 * @throws StateValueTypeException
64 * If the contained value cannot be read as an integer
65 */
66 public int unboxInt() throws StateValueTypeException;
67
68 /**
69 * Read the contained value as a String
70 *
71 * @return The String contained in the state value
72 * @throws StateValueTypeException
73 * If the contained value cannot be read as a String
74 */
75 public String unboxStr() throws StateValueTypeException;
76
77 /**
78 * Read the contained value as a 'long' primitive
79 *
80 * @return The long contained in the state value
81 * @throws StateValueTypeException
82 * If the contained value cannot be read as a long
83 * @since 2.0
84 */
85 public long unboxLong() throws StateValueTypeException;
86 }
This page took 0.032351 seconds and 5 git commands to generate.