search

goog.structs.Set<T>

Provided By
All Implemented Interfaces
warning Deprecated

This type is misleading: use ES6 Set instead.

A set that can contain both primitives and objects. Adding and removing elements is O(1). Primitives are treated as identical if they have the same type and convert to the same string. Objects are treated as identical only if they are references to the same object. WARNING: A goog.structs.Set can contain both 1 and (new Number(1)), because they are not the same. WARNING: Adding (new Number(1)) twice will yield two distinct elements, because they are two different objects. WARNING: Any object that is added to a goog.structs.Set will be modified! Because goog.getUid() is used to identify objects, every object in the set will be mutated.

new Set<T>( opt_values )

Parameters
opt_values(Array<(T|null)>|Object<?, (T|null)>|null)=

Initial values to start with.

Instance Methods

Instance Properties