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

## Interface ISetProperty<S,​E>

Type Parameters:
  `S` - type of the source object
  `E` - type of the elements in the set

All Superinterfaces:
  `IProperty`

All Known Subinterfaces:
  `IBeanSetProperty`, `IViewerSetProperty`

All Known Implementing Classes:
  `DelegatingSetProperty`, `SetProperty`, `SimpleSetProperty`, `UnionSetProperty`, `ViewerSetProperty`

    public interface ISetProperty<S,​E>
    extends IProperty

Interface for set-typed properties

Since:
  1.2
See Also:
  `SetProperty`, `SimpleSetProperty`
Restriction:
  This interface is not intended to be implemented by clients. Clients should instead subclass one of the classes that implement this interface. Note that direct implementers of this interface outside of the framework will be broken in future releases when methods are added to this interface.

### Method Summary

All Methods Instance Methods Abstract Methods
`Object` `getElementType()` Returns the type of the elements in the collection or `null` if untyped
`Set<E>` `getSet​(S source)` Returns an unmodifiable Set with the current contents of the source's set property
`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
`<U extends S> IObservableSet<E>` `observeDetail​(IObservableValue<U> master)` Returns an observable set on the master observable's realm which tracks this property of the current value of `master`.
`IObservableFactory<S,​IObservableSet<E>>` `setFactory()` Returns a factory for creating observable sets tracking this property of a particular property source.
`IObservableFactory<S,​IObservableSet<E>>` `setFactory​(Realm realm)` Returns a factory for creating observable sets in the given realm, tracking this property of a particular property source.
`void` `setSet​(S source, Set<E> set)` Updates the property on the source with the specified change.
`void` `updateSet​(S source, SetDiff<E> diff)` Updates the property on the source with the specified change.
`<T> IMapProperty<S,​E,​T>` `values​(IValueProperty<? super E,​T> detailValues)` Returns the nested combination of this property and the specified detail value property.

### Method Detail

#### getElementType

    Object getElementType()

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

#### getSet

    Set<E> getSet​(S source)

Returns an unmodifiable Set with the current contents of the source's set property

Parameters:
  `source` - the property source (may be null)
Returns:
  an unmodifiable Set with the current contents of the source's set property
Since:
  1.3

#### setSet

    void setSet​(S source,
                Set<E> set)

Updates the property on the source with the specified change.

Note: This method is made available to facilitate basic property access. However if the property source lacks property change notification, then observables on the source object may not be notified of the change. In most cases it is preferable to modify the source through an `IObservableSet` than through the property directly.

Parameters:
  `source` - the property source (may be null)
  `set` - the new set
Since:
  1.3

#### updateSet

    void updateSet​(S source,
                   SetDiff<E> diff)

Updates the property on the source with the specified change.

Note: This method is made available to facilitate basic property access. However if the property source lacks property change notification, then observables on the source object may not be notified of the change. In most cases it is preferable to modify the source through an `IObservableSet` than through the property directly.

Parameters:
  `source` - the property source (may be null)
  `diff` - a diff describing the change
Since:
  1.3

#### observe

    IObservableSet<E> observe​(S source)

Returns an observable set observing this set property on the given property source

Parameters:
  `source` - the property source
Returns:
  an observable set observing this set property on the given property source

#### observe

    IObservableSet<E> observe​(Realm realm,
                              S source)

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

#### setFactory

    IObservableFactory<S,​IObservableSet<E>> setFactory()

Returns a factory for creating observable sets tracking this property of a particular property source.

Returns:
  a factory for creating observable sets tracking this property of a particular property source.

#### setFactory

    IObservableFactory<S,​IObservableSet<E>> setFactory​(Realm realm)

Returns a factory for creating observable sets in the given realm, tracking this property of a particular property source.

Parameters:
  `realm` - the realm
Returns:
  a factory for creating observable sets in the given realm, tracking this property of a particular property source.

#### observeDetail

    <U extends S> IObservableSet<E> observeDetail​(IObservableValue<U> master)

Returns an observable set on the master observable's realm which tracks this property of the current value of `master`.

Parameters:
  `master` - the master observable
Returns:
  an observable set on the given realm which tracks this property of the current value of `master`.

#### values

    <T> IMapProperty<S,​E,​T> values​(IValueProperty<? super E,​T> detailValues)

Returns the nested combination of this property and the specified detail value property. Note that because this property is a projection of value properties over a set, the only modifications supported are through the `IObservableMap.put(Object, Object)` and `Map.putAll(java.util.Map)` methods. In the latter case, this property does not put entries for keys not already in the master key set. Modifications made through the returned property are delegated to the detail property, using the corresponding set element from the master property as the source.

Parameters:
  `detailValues` - the detail property
Returns:
  the nested combination of the master set and detail value properties