@Override
    public boolean retainAll(Collection<?> items) {
        Set<T> toBeRemoved = new HashSet<T>();

        for (T item : internal) {
            if (!items.contains(item)) {
                toBeRemoved.add(item);
            }
        }

        if (!toBeRemoved.isEmpty()) {
            internal.removeAll(toBeRemoved);
            doNotifyListenersOfRemovedValues(toBeRemoved);
        }

        return !toBeRemoved.isEmpty();
    }
@ Override public boolean retainAll ( Collection < ? > items ) { Set < T > toBeRemoved = new HashSet < T > ( ) ; for ( T item : internal ) { if ( ! items . contains ( item ) ) { toBeRemoved . add ( item ) ; } } if ( ! toBeRemoved . isEmpty ( ) ) { internal . removeAll ( toBeRemoved ) ; doNotifyListenersOfRemovedValues ( toBeRemoved ) ; } return ! toBeRemoved . isEmpty ( ) ; }
@see AbstractReadableWritableSetProperty#retainAll(Collection)
@see Set#retainAll(Collection)