unsafeView<T> static method

ListSet<T> unsafeView<T>(
  1. Set<T> set
)

Creates a ListSet form the given set. If the set is already of type ListSet, return the same instance. This is unsafe because a ListSetView is fixed size, but the given set may not.

Implementation

static ListSet<T> unsafeView<T>(Set<T> set) => (set is ListSet<T>) ? set : ListSetView<T>(set);