Package org.eclipse.core.databinding.property.set

## Class DelegatingSetProperty<S,​E>

- java.lang.Object
- - org.eclipse.core.databinding.property.set.SetProperty<S,​E>
  - - org.eclipse.core.databinding.property.set.DelegatingSetProperty<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 abstract class DelegatingSetProperty<S,​E>
    extends SetProperty<S,​E>

Since:
  1.2

### Constructor Summary

Constructors
`protected` `DelegatingSetProperty()`
`protected` `DelegatingSetProperty​(Object elementType)`

### Method Summary

All Methods Instance Methods Abstract Methods Concrete Methods
`protected abstract ISetProperty<S,​E>` `doGetDelegate​(S source)` Returns the property to delegate to for the specified source object.
`protected Set<E>` `doGetSet​(S source)` Returns a Set with the current contents of the source's set property
`protected void` `doSetSet​(S source, Set<E> set)` Updates the property on the source with the specified change.
`protected void` `doUpdateSet​(S source, SetDiff<E> diff)` Updates the property on the source with the specified change.
`protected ISetProperty<S,​E>` `getDelegate​(S source)` Returns the property to delegate to for the specified source object.
`Object` `getElementType()` Returns the type of the elements in the collection or `null` if untyped
`IObservableSet<E>` `observe​(Realm realm, S source)` Returns an observable set observing this set property on the given property source
`IObservableSet<E>` `observe​(S source)` Returns an observable set observing this set property on the given property source

### Methods inherited from class org.eclipse.core.databinding.property.set.SetProperty

`getSet, observeDetail, setFactory, setFactory, setSet, updateSet, values`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Constructor Detail

#### DelegatingSetProperty

    protected DelegatingSetProperty()

#### DelegatingSetProperty

    protected DelegatingSetProperty​(Object elementType)

### Method Detail

#### getDelegate

    protected final ISetProperty<S,​E> getDelegate​(S source)

Returns the property to delegate to for the specified source object. Repeated calls to this method with the same source object returns the same delegate instance.

Parameters:
  `source` - the property source (may be null)
Returns:
  the property to delegate to for the specified source object.

#### doGetDelegate

    protected abstract ISetProperty<S,​E> doGetDelegate​(S source)

Returns the property to delegate to for the specified source object. Implementers must ensure that repeated calls to this method with the same source object returns the same delegate instance.

Parameters:
  `source` - the property source
Returns:
  the property to delegate to for the specified source object.

#### 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​(S source)

Description copied from interface: `ISetProperty`
Returns an observable set observing this set property on the given property source

Specified by:
  `observe` in interface `ISetProperty<S,​E>`
Overrides:
  `observe` in class `SetProperty<S,​E>`
Parameters:
  `source` - the property source
Returns:
  an observable set observing this set property on the given property source

#### 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