org.simantics.databoard.accessor.interestset
Class VariantInterestSet

java.lang.Object
  extended by org.simantics.databoard.accessor.interestset.InterestSet
      extended by org.simantics.databoard.accessor.interestset.VariantInterestSet

public class VariantInterestSet
extends InterestSet

Interest set of Variant Type.

Author:
Toni Kalajainen
See Also:
VariantType

Field Summary
 boolean completeComponent
          Interested in the complete structure of the container.
 InterestSet componentInterest
          Component intersts, null if no specific interest
static VariantInterestSet MONITOR_EVERYTHING
           
 boolean notification
          Interested in notification (excludes the value)
 boolean value
          Interested in the value assignment (includes notification)
 
Constructor Summary
VariantInterestSet(boolean notification, boolean value, InterestSet componentInterest, boolean completeContainer)
          Create a new interest set of a variant.
 
Method Summary
 InterestSet getComponentInterest()
          Component interest of expected type.
 boolean inCompleteComponent()
          Returns true, if interested in everything in the sub container, value assignment and change
 boolean inNotifications()
          Returns true, if interested in notification of value assignment.
 boolean inValues()
          Returns true, if interested in the value assignment
 
Methods inherited from class org.simantics.databoard.accessor.interestset.InterestSet
newInterestSet
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

MONITOR_EVERYTHING

public static final VariantInterestSet MONITOR_EVERYTHING

notification

public boolean notification
Interested in notification (excludes the value)


value

public boolean value
Interested in the value assignment (includes notification)


componentInterest

public InterestSet componentInterest
Component intersts, null if no specific interest


completeComponent

public boolean completeComponent
Interested in the complete structure of the container. Includes interest in value assignment and notification

Constructor Detail

VariantInterestSet

public VariantInterestSet(boolean notification,
                          boolean value,
                          InterestSet componentInterest,
                          boolean completeContainer)
Create a new interest set of a variant.

Parameters:
notification - interest in notification of assignment
value - interest in notification and the new value of value assignment
componentInterest - specific interest in the value
completeContainer - interest in notification, the new value and complete sub structure of the container
Method Detail

inNotifications

public boolean inNotifications()
Returns true, if interested in notification of value assignment. This doesn't include interest in the new value.

Specified by:
inNotifications in class InterestSet
Returns:
true, if interested in notification of value assignment.

inValues

public boolean inValues()
Returns true, if interested in the value assignment

Specified by:
inValues in class InterestSet
Returns:
true, if interested in the value assignment

inCompleteComponent

public boolean inCompleteComponent()
Returns true, if interested in everything in the sub container, value assignment and change

Returns:
true, if has interest to the complete sub-tree of the component

getComponentInterest

public InterestSet getComponentInterest()
Component interest of expected type. If interest set doesn't match the type of the assigned value, then this field is ignored.

Returns:
the interest of the component, or null