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.
22 * @author Alexandre Montplaisir
24 public interface ITmfStateValue
{
27 * The supported types of state values
31 /** Null value, for an interval not carrying any information */
33 /** 32-bit integer value */
35 /** Variable-length string value */
40 * Each implementation has to define which one (among the supported types)
41 * they implement. There could be more than one implementation of each type,
42 * depending on the needs of the different users.
44 * @return The ITmfStateValue.Type enum representing the type of this value
47 public Type
getType();
50 * Only "null values" should return true here
52 * @return True if this type of SV is considered "null", false if it
53 * contains a real value.
55 public boolean isNull();
58 * Read the contained value as an 'int' primitive
60 * @return The integer contained in the state value
61 * @throws StateValueTypeException
62 * If the contained value cannot be read as an integer
64 public int unboxInt() throws StateValueTypeException
;
67 * Read the contained value as a String
69 * @return The String contained in the state value
70 * @throws StateValueTypeException
71 * If the contained value cannot be read as a String
73 public String
unboxStr() throws StateValueTypeException
;
This page took 0.032537 seconds and 5 git commands to generate.