1 /*******************************************************************************
2 * Copyright (c) 2012 Ericsson
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
10 * Alexandre Montplaisir - Initial API
11 ******************************************************************************/
13 package org
.eclipse
.linuxtools
.tmf
.core
.statevalue
;
15 import org
.eclipse
.linuxtools
.tmf
.core
.exceptions
.StateValueTypeException
;
19 * This is the interface for using state values and reading their contents.
24 public interface ITmfStateValue
{
26 /** The 'byte' value associated to null state values (-1) */
27 public static final byte TYPE_NULL
= -1;
29 /** The 'byte' value associated to integer state values (0) */
30 public static final byte TYPE_INTEGER
= 0;
32 /** The 'byte' value associated to null state values (1) */
33 public static final byte TYPE_STRING
= 1;
36 * Each implementation has to supply a "type" number. This will get written
37 * as-is in the History file to recognize the type, so it needs to be unique
39 * @return The unique "int8" assigned to this state value type
41 public byte getType();
44 * Only "null values" should return true here
46 * @return True if this type of SV is considered "null", false if it
47 * contains a real value.
49 public boolean isNull();
52 * Read the contained value as an 'int' primitive
54 * @return The integer contained in the state value
55 * @throws StateValueTypeException
56 * If the contained value cannot be read as an integer
58 public int unboxInt() throws StateValueTypeException
;
61 * Read the contained value as a String
63 * @return The String contained in the state value
64 * @throws StateValueTypeException
65 * If the contained value cannot be read as a String
67 public String
unboxStr() throws StateValueTypeException
;
This page took 0.034465 seconds and 5 git commands to generate.