]> gerrit.simantics Code Review - simantics/platform.git/blob - bundles/org.simantics.simulation/src/org/simantics/simulation/data/VariableHandle.java
Fixed all line endings of the repository
[simantics/platform.git] / bundles / org.simantics.simulation / src / org / simantics / simulation / data / VariableHandle.java
1 /*******************************************************************************
2  * Copyright (c) 2007 VTT Technical Research Centre of Finland and others.
3  * All rights reserved. This program and the accompanying materials
4  * are made available under the terms of the Eclipse Public License v1.0
5  * which accompanies this distribution, and is available at
6  * http://www.eclipse.org/legal/epl-v10.html
7  *
8  * Contributors:
9  *     VTT Technical Research Centre of Finland - initial API and implementation
10  *******************************************************************************/
11 package org.simantics.simulation.data;
12
13 import org.simantics.databoard.accessor.error.AccessorException;
14 import org.simantics.databoard.binding.Binding;
15
16 /**
17  * A handle to a variable of a {@link Datasource}.
18  *
19  * @author Toni Kalajainen <toni.kalajainen@vtt.fi>
20  */
21 public interface VariableHandle {
22
23         /**
24          * @return key (ID) of the variable
25          */
26         String key();
27
28         /**
29          * @return binding for the variable
30          */
31         Binding binding();
32
33         /**
34          * @return current value associated with this handle
35          * @throws AccessorException if value cannot be retrieved
36          */
37         Object getValue() throws AccessorException;
38
39         /**
40          * Frees any resource related to this handle.
41          */
42         void dispose();
43
44 }
45