Skip to main content

class HashSetBlock<T>

undocumented

Extends: HashSetNonEmptyBase<T>

Type parameters

NameDescription
Tundocumented

Properties

context

undocumented

Definition

readonly context: HashSetContext<T>;

Overrides

HashSetNonEmptyBase.context

entries

undocumented

Definition

readonly entries: readonly T[] | null;

entrySets

undocumented

Definition

readonly entrySets: readonly SetEntrySet<T>[] | null;

isEmpty

undocumented

Definition

get isEmpty(): false;

Overrides

NonEmptyBase.isEmpty

level

undocumented

Definition

readonly level: number;

size

undocumented

Definition

readonly size: number;

Overrides

HashSetNonEmptyBase.size

Methods

[Symbol.iterator]

undocumented

Definition

[Symbol.iterator](): FastIterator<E>;

Overrides

NonEmptyBase.[Symbol.iterator]

add

undocumented

Definition

add(value: T, hash?: number): HashSetBlock<T>;

Parameters

NameTypeDescription
valueT
hashnumber

Overrides

HashSetNonEmptyBase.add

addAll

Returns the collection with the values in given values StreamSource added.

Definition

addAll(values: StreamSource<T>): HashSet.NonEmpty<T>;

Parameters

NameTypeDescription
valuesStreamSource<T>
example
HashSet.of(1, 2, 3).addAll(10, 11).toArray()   // => [1, 2, 3, 10, 11]

Overrides

NonEmpty.addAll, HashSetNonEmptyBase.addAll

asNormal

undocumented

Definition

asNormal(): this;

Overrides

NonEmptyBase.asNormal, HashSetNonEmptyBase.asNormal

assumeNonEmpty

undocumented

Definition

assumeNonEmpty(): this;

Overrides

NonEmptyBase.assumeNonEmpty

copy

undocumented

Definition

copy(entries?: readonly T[] |null, entrySets?: readonlySetEntrySet<T>[] |null, size?: number):HashSetBlock<T>;

Parameters

NameTypeDescription
entriesreadonly T[] | null
entrySetsreadonly SetEntrySet<T>[] | null
sizenumber

difference

undocumented

Definition

difference(other: StreamSource<T>): HashSet<T>;

Parameters

NameTypeDescription
otherStreamSource<T>

Overrides

HashSetNonEmptyBase.difference

filter

undocumented

Definition

filter(pred: (value: T, index: number, halt: () => void) => boolean, options?: {
    negate?: boolean | undefined;
  }): any;

Parameters

NameTypeDescription
pred(value: T, index: number, halt: () => void) => boolean
options{
    negate?: boolean | undefined;
  }

Overrides

HashSetNonEmptyBase.filter

forEach

undocumented

Definition

forEach(f: (entry: T, index: number, halt: () => void) => void, options?: {
    state?: TraverseState;
  }): void;

Parameters

NameTypeDescription
f(entry: T, index: number, halt: () => void) => void
options{
    state?: TraverseState;
  }

Overrides

HashSetNonEmptyBase.forEach

has

undocumented

Definition

has<U>(value: RelatedTo<T, U>, inHash?: number): boolean;

Type parameters

NameDescription
U

Parameters

NameTypeDescription
valueRelatedTo<T, U>
inHashnumber

Overrides

HashSetNonEmptyBase.has

intersect

undocumented

Definition

intersect(other: StreamSource<T>): HashSet<T>;

Parameters

NameTypeDescription
otherStreamSource<T>

Overrides

HashSetNonEmptyBase.intersect

nonEmpty

undocumented

Definition

nonEmpty(): true;

Overrides

NonEmptyBase.nonEmpty

remove

undocumented

Definition

remove<U>(value: RelatedTo<T, U>, hash?: number): HashSet<T>;

Type parameters

NameDescription
U

Parameters

NameTypeDescription
valueRelatedTo<T, U>
hashnumber

Overrides

HashSetNonEmptyBase.remove

removeAll

undocumented

Definition

removeAll(values: StreamSource<T>): HashSet<T>;

Parameters

NameTypeDescription
valuesStreamSource<T>

Overrides

HashSetNonEmptyBase.removeAll

stream

undocumented

Definition

stream(): Stream.NonEmpty<T>;

Overrides

HashSetNonEmptyBase.stream

symDifference

Returns a collection of the values that are either in this collection or in the other StreamSource, but not in both.

Definition

symDifference(other: StreamSource<T>): HashSet<T>;

Parameters

NameTypeDescription
otherStreamSource<T>
example
HashSet.of(1, 2, 3).symDifference([2, 4]).toArray()
// => [1, 3, 4]

Overrides

RSetBase.symDifference, HashSetNonEmptyBase.symDifference

toArray

undocumented

Definition

toArray(): ArrayNonEmpty<T>;

Overrides

HashSetNonEmptyBase.toArray

toBuilder

Returns a builder object containing the values of this collection.

Definition

toBuilder(): HashSet.Builder<T>;

example
const builder: HashSet.Builder<number> = HashSet.of(1, 2, 3).toBuilder()

Overrides

RSetBase.toBuilder, HashSetNonEmptyBase.toBuilder

toJSON

undocumented

Definition

toJSON(): ToJSON<T[]>;

Overrides

HashSetNonEmptyBase.toJSON

toString

undocumented

Definition

toString(): string;

Overrides

HashSetNonEmptyBase.toString

union

Returns a collection containing all values from this collection and all values of given other StreamSource.

Definition

union(other: StreamSource<T>): HashSet.NonEmpty<T>;

Parameters

NameTypeDescription
otherStreamSource<T>
example
HashSet.of(1, 2, 3).union(HashSet.of(2, 4, 6)).toArray()
// => [1, 2, 3, 4, 6]

Overrides

NonEmpty.union, HashSetNonEmptyBase.union