]> gerrit.simantics Code Review - simantics/platform.git/blob - bundles/org.simantics.databoard/src/org/simantics/databoard/accessor/interestset/FloatInterestSet.java
Migrated source code from Simantics SVN
[simantics/platform.git] / bundles / org.simantics.databoard / src / org / simantics / databoard / accessor / interestset / FloatInterestSet.java
1 /*******************************************************************************\r
2  *  Copyright (c) 2010 Association for Decentralized Information Management in\r
3  *  Industry THTH ry.\r
4  *  All rights reserved. This program and the accompanying materials\r
5  *  are made available under the terms of the Eclipse Public License v1.0\r
6  *  which accompanies this distribution, and is available at\r
7  *  http://www.eclipse.org/legal/epl-v10.html\r
8  *\r
9  *  Contributors:\r
10  *      VTT Technical Research Centre of Finland - initial API and implementation\r
11  *******************************************************************************/\r
12 package org.simantics.databoard.accessor.interestset;
13
14 import org.simantics.databoard.type.FloatType;\r
15
16 /**
17  * Interest set of Float Type.
18  *
19  * @see FloatType
20  * @author Toni Kalajainen <toni.kalajainen@vtt.fi>
21  */
22 public class FloatInterestSet extends InterestSet {
23         
24         public static final FloatInterestSet MONITOR_EVERYTHING = new FloatInterestSet(true, true); 
25         
26         /** Interested in notification (excludes the value) */
27         public boolean notification = true;
28         /** Interested in the value (includes notification) */  
29         public boolean value = true;
30         
31         public FloatInterestSet(boolean notification, boolean value) {
32                 this.notification = notification;
33                 this.value = value;
34         }
35
36         /**
37          * Returns true, if interested in notifications. This does not include
38          * interest of the value.
39          * 
40          * @return true if interested in notification 
41          */
42         public boolean inNotifications() {
43                 return notification | value;
44         }       
45         
46         /**
47          * Returns true, if interested in the value  
48          * 
49          * @return true if interested in the value
50          */
51         public boolean inValues() {
52                 return value;
53         }
54         
55 }
56