unlockView property

Set<T> unlockView

Unlocks the set, returning a safe, unmodifiable (immutable) Set view. The word "view" means the set is backed by the original ISet. Using this is very fast, since it makes no copies of the ISet items. However, if you try to use methods that modify the set, like add, it will throw an UnsupportedError. It is also very fast to lock this set back into an ISet.

See also: UnmodifiableSetFromISet

Implementation

Set<T> get unlockView => UnmodifiableSetFromISet(this);