Like Set but with an addAll method to eventually add items from another iterable. Access methods make sure that all delayed operations are executed. Iteration methods deopts to normal Set performance until clear is called again (because of the chance of modifications during iteration).
new LazySet(iterable?): LazySet<Iterable><LazySet><T>
>Seeds the set with an optional iterable while preparing internal queues for deferred merges.
<number><SetIterator><T>
>Returns the default iterator over values after forcing pending merges.
add
add(item): voiditem{T} an item- Returns:
<LazySet><<T>> itself
Adds a single item immediately to the concrete backing set.
addAll(iterable): LazySet<LazySet><T>
> |
<Iterable>
<
<T>
,
<any>
,
<any>
> a immutable iterable or another immutable LazySet which will eventually be merged into the Set<LazySet><T>
> itselfQueues another iterable or lazy set for later merging so large bulk adds can stay cheap until the set is read.
clear(): void<void>Removes all items and clears every deferred merge queue.
delete(value): voidvalue{T} an item- Returns:
<boolean>true, if the value was in the Set before
Deletes an item after first materializing any deferred additions that may contain it.
entries(): SetIterator<SetIterator><Tuple>
<
<T>
,
<T>
>> entriesReturns the set's entry iterator and permanently switches future operations to eager merge mode to preserve iterator correctness.
forEach(callbackFn, thisArg): void<Function><void>Iterates over every item after forcing pending merges and switching to eager mode for correctness during iteration.
has
has(item): voiditem{T} an item- Returns:
<boolean>true, when the item is in the Set
Checks whether an item is present after applying any deferred merges.
keys
keys(): SetIterator<SetIterator><T>
> keysReturns the key iterator, eagerly materializing pending merges first.
serialize(objectSerializerContext): void<ObjectSerializerContext><void>Serializes the fully materialized set contents into webpack's object serialization stream.
values(): SetIterator<SetIterator><T>
> valuesReturns the value iterator, eagerly materializing pending merges first.
<ObjectDeserializerContext><LazySet><T>
> lazy setRestores a LazySet from serialized item data.
<void><Iterator><T>
,
<TReturn>
,
<TNext>
><void><IteratorObject><T>
,
<TReturn>
,
<TNext>
><IteratorObject><T>
,
<undefined>
><void><SetIterator><T>
>