1 /*******************************************************************************
2 * Copyright (c) 2010 Association for Decentralized Information Management in
4 * All rights reserved. This program and the accompanying materials
5 * are made available under the terms of the Eclipse Public License v1.0
6 * which accompanies this distribution, and is available at
7 * http://www.eclipse.org/legal/epl-v10.html
10 * VTT Technical Research Centre of Finland - initial API and implementation
11 *******************************************************************************/
12 package org.simantics.databoard.accessor.interestset;
14 import org.simantics.databoard.type.BooleanType;
17 * Interest set of a Boolean Type.
20 * @author Toni Kalajainen <toni.kalajainen@vtt.fi>
22 public class BooleanInterestSet extends InterestSet {
24 public static final BooleanInterestSet MONITOR_EVERYTHING = new BooleanInterestSet(true, true);
26 /** Interested in the notification (excludes the value) */
27 public boolean notification = true;
28 /** Interested in the value (includes notification) */
29 public boolean value = true;
31 public BooleanInterestSet(boolean notification, boolean value) {
32 this.notification = notification;
37 * Returns true, if interested in notification. The result does not include interest
40 * @return true if interested in notifications
42 public boolean inNotifications() {
43 return notification | value;
47 * Returns true, if interested in the value
49 * @return true if interested in the value
51 public boolean inValues() {