Class UnionSetProperty<S,E>

java.lang.Object
org.eclipse.core.databinding.property.set.SetProperty<S,E>
org.eclipse.core.databinding.property.set.UnionSetProperty<S,E>
Type Parameters:
S - type of the source object
E - type of the elements in the set
All Implemented Interfaces:
IProperty, ISetProperty<S,E>

public class UnionSetProperty<S,E> extends SetProperty<S,E>
A set property for observing the union of multiple set properties a combined set.
Since:
1.2
  • Constructor Details

    • UnionSetProperty

      public UnionSetProperty(ISetProperty<S,E>[] properties)
      Parameters:
      properties - the property sets to unify
    • UnionSetProperty

      public UnionSetProperty(ISetProperty<S,E>[] properties, Object elementType)
      Parameters:
      properties - the property sets to unify
      elementType - the element type or null
  • Method Details

    • getElementType

      public Object getElementType()
      Description copied from interface: ISetProperty
      Returns the type of the elements in the collection or null if untyped
      Returns:
      the type of the elements in the collection or null if untyped
    • doGetSet

      protected Set<E> doGetSet(S source)
      Description copied from class: SetProperty
      Returns a Set with the current contents of the source's set property
      Overrides:
      doGetSet in class SetProperty<S,E>
      Parameters:
      source - the property source
      Returns:
      a Set with the current contents of the source's set property
    • doSetSet

      protected void doSetSet(S source, Set<E> set)
      Description copied from class: SetProperty
      Updates the property on the source with the specified change.
      Overrides:
      doSetSet in class SetProperty<S,E>
      Parameters:
      source - the property source
      set - the new set
    • doUpdateSet

      protected void doUpdateSet(S source, SetDiff<E> diff)
      Description copied from class: SetProperty
      Updates the property on the source with the specified change.
      Overrides:
      doUpdateSet in class SetProperty<S,E>
      Parameters:
      source - the property source
      diff - a diff describing the change
    • observe

      public IObservableSet<E> observe(Realm realm, S source)
      Description copied from interface: ISetProperty
      Returns an observable set observing this set property on the given property source
      Parameters:
      realm - the observable's realm
      source - the property source
      Returns:
      an observable set observing this set property on the given property source