org.simantics.databoard.accessor.interestset
Class ArrayInterestSet

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

public class ArrayInterestSet
extends InterestSet

Interest set of an Array Type.

Author:
Toni Kalajainen
See Also:
ArrayType

Field Summary
 InterestSet componentInterest
          Component Interest of the contents of values.
 java.util.Map<java.lang.Integer,InterestSet> componentInterests
          Component Interests of the contents of values of specific elements (incl. interest in change and value), null if no interest.
static ArrayInterestSet MONITOR_EVERYTHING
           
 boolean notification
          Interested in notification of element assignments, add and removal (excludes the value)
 int[] notifications
          Interested in notifications to elements by index, (excludes the value).
 boolean value
          Interested in all notification and value assignments
 int[] values
          Interested in values by element (includes change).
 
Constructor Summary
ArrayInterestSet(boolean notification, int[] specificNotifications, boolean values, int[] specificValues, InterestSet componentInterest, java.util.Map<java.lang.Integer,InterestSet> componentInterests)
          Create an array interest set
 
Method Summary
 InterestSet getComponentInterest()
          Get the interest of the contents of every value
 InterestSet getComponentInterest(int index)
          Get composite interest of component value of element at index
 boolean inNotifications()
          Returns true, if interested in element assignment, add, removal.
 boolean inNotificationsOf(int elementIndex)
          Returns true, if interested in assignment of the element at specific index
 boolean inValues()
          Returns true, if interested in all new value assignments
 boolean inValuesOf(int elementIndex)
          Returns true, if interested in value assignment of a element at index.
 
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 ArrayInterestSet MONITOR_EVERYTHING

notification

public boolean notification
Interested in notification of element assignments, add and removal (excludes the value)


notifications

public int[] notifications
Interested in notifications to elements by index, (excludes the value). Sorted array of indices.


value

public boolean value
Interested in all notification and value assignments


values

public int[] values
Interested in values by element (includes change). Sorted array of indices


componentInterest

public InterestSet componentInterest
Component Interest of the contents of values. Incl. interest in change and value. null if no interest.


componentInterests

public java.util.Map<java.lang.Integer,InterestSet> componentInterests
Component Interests of the contents of values of specific elements (incl. interest in change and value), null if no interest.

Constructor Detail

ArrayInterestSet

public ArrayInterestSet(boolean notification,
                        int[] specificNotifications,
                        boolean values,
                        int[] specificValues,
                        InterestSet componentInterest,
                        java.util.Map<java.lang.Integer,InterestSet> componentInterests)
Create an array interest set

Parameters:
notification - interested in add, remove and change to assignment of all elements
specificNotifications - interested in add, remove and change to assignment of all specific elements
values - interested in add, remove and change to assignment of all elements, incl. new values
specificValues - interested in add, remove and change to assignment of all specific elements, incl. new values
componentInterest - Interest of the changes of values and their sub-value changes of all elements
componentInterests - Interest of the changes of values and their sub-value changes of specific elements
Method Detail

inNotifications

public boolean inNotifications()
Returns true, if interested in element assignment, add, removal. This excludes interest in the new values.

Specified by:
inNotifications in class InterestSet
Returns:
true if interested in notifications

inNotificationsOf

public boolean inNotificationsOf(int elementIndex)
Returns true, if interested in assignment of the element at specific index

Parameters:
elementIndex -
Returns:
true if interested in notifications of a specific element

inValues

public boolean inValues()
Returns true, if interested in all new value assignments

Specified by:
inValues in class InterestSet
Returns:
true if interested in values of any element

inValuesOf

public boolean inValuesOf(int elementIndex)
Returns true, if interested in value assignment of a element at index.

Parameters:
elementIndex -
Returns:
true if interested in the values of a specific element

getComponentInterest

public InterestSet getComponentInterest()
Get the interest of the contents of every value

Returns:
component interest set or null

getComponentInterest

public InterestSet getComponentInterest(int index)
Get composite interest of component value of element at index

Parameters:
index - element index
Returns:
composite interest set or null