public static <E> void bindContent (Set<E> set1, ObservableSet<? extends E> set2)

Generates a content binding between an javafx.collections.ObservableSet and a java.util.Set.

A content binding ensures that the Set contains the same elements as the ObservableSet. If the content of the ObservableSet changes, the Set will be updated automatically.

Once a Set is bound to an ObservableSet, the Set must not be changed directly anymore. Doing so would lead to unexpected results.

A content-binding can be removed with unbindContent(Object, Object).

Parameters:
<E>     the type of the Set elements
set1     the Set
set2     the ObservableSet

Exceptions:
NullPointerException     if one of the sets is null
IllegalArgumentException     if set1 == set2

Since:  JavaFX 2.1