Options
All
  • Public
  • Public/Protected
  • All
Menu

Class BinarySet

A set of binary values represented as either ArrayBuffer objects or ArrayBufferView objects. Equality is determined by the underlying byte sequence and not by the identity or view window type of the provided value.

Hierarchy

Implements

Index

Constructors

constructor

Properties

__@toStringTag

__@toStringTag: "Set" = "Set"

Returns the string literal 'Set' for use by Object.prototype.toString. This allows for identifying Sets without checking constructor identity.

Protected _values

_values: Array<BinaryValue> = []

Accessors

size

  • get size(): number

Methods

__@iterator

add

  • Add a value to the set. If the value is already contained in the set, it will not be added a second time.

    Parameters

    Returns this

clear

  • clear(): void

delete

entries

  • Returns an iterable two-member tuples for each item in the set, where the item is provided twice.

    Part of the ES2015 Set specification for compatibility with Map objects.

    Returns IterableIterator<[BinaryValue, BinaryValue]>

forEach

  • forEach(callback: function, thisArg?: any): void

has

  • inheritdoc

    Equality is determined by inspecting the bytes of the ArrayBuffer or ArrayBufferView.

    example

    On a little-endian system, the following values would be considered equal:

    new Uint32Array([0xdeadbeef]);
    (new Uint32Array([0xdeadbeef])).buffer;
    new Uint16Array([0xbeef, 0xdead]);
    new Uint8Array([0xef, 0xbe, 0xad, 0xde]);
    

    Parameters

    Returns boolean

keys

values