On this page

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?): void
  • iterable {Iterable<T, any, any>} init iterable
  • Returns: {LazySet}
Attributes
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).
Returns:
{SetIterator }

add(item): void
  • item {T} an item
  • Returns: {LazySet} itself

addAll(iterable): void
  • iterable {LazySet|Iterable<T, any, any>} a immutable iterable or another immutable LazySet which will eventually be merged into the Set
  • Returns: {LazySet} itself

clear(): void
Returns:
{void}

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).


delete(value): void
  • value {T} an item
  • Returns: <boolean> true, if the value was in the Set before

entries(): SetIterator<Tuple<T, T>>
Returns:
{SetIterator<Tuple<T, T>>} entries

forEach(callbackFn, thisArg): void
Attributes
callbackFn:<object>
function called for each entry
thisArg:
{K} this argument for the callbackFn
Returns:
{void}

has(item): void
  • item {T} an item
  • Returns: <boolean> true, when the item is in the Set

keys(): SetIterator<T>
Returns:
{SetIterator } keys

serialize(__namedParameters): void
Attributes
__namedParameters:<ObjectSerializerContext>
context
Returns:
{void}

values(): SetIterator<T>
Returns:
{SetIterator } values

Attributes
__namedParameters:<ObjectDeserializerContext>
context
Returns:
{LazySet } lazy set