1 /*******************************************************************************
2 * Copyright (c) 2012, 2013 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 */
37 /** 64-bit integer value */
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.
46 * @return The ITmfStateValue.Type enum representing the type of this value
49 public Type
getType();
52 * Only "null values" should return true here
54 * @return True if this type of SV is considered "null", false if it
55 * contains a real value.
57 public boolean isNull();
60 * Read the contained value as an 'int' primitive
62 * @return The integer contained in the state value
63 * @throws StateValueTypeException
64 * If the contained value cannot be read as an integer
66 public int unboxInt() throws StateValueTypeException
;
69 * Read the contained value as a String
71 * @return The String contained in the state value
72 * @throws StateValueTypeException
73 * If the contained value cannot be read as a String
75 public String
unboxStr() throws StateValueTypeException
;
78 * Read the contained value as a 'long' primitive
80 * @return The long contained in the state value
81 * @throws StateValueTypeException
82 * If the contained value cannot be read as a long
85 public long unboxLong() throws StateValueTypeException
;
This page took 0.032351 seconds and 5 git commands to generate.