Skip to main content

class BiMapEmpty<K,V>

undocumented

Extends: EmptyBase

Type parameters​

NameDefaultDescription
Kanyundocumented
Vanyundocumented

Properties​

_NonEmptyType​

undocumented

Definition​

_NonEmptyType: BiMap.NonEmpty<K, V>;

Overrides​

EmptyBase._NonEmptyType

context​

undocumented

Definition​

readonly context: BiMapContext<K, V>;

isEmpty​

Returns true since the collection is empty.

Definition​

get isEmpty(): true;

Overrides​

EmptyBase.isEmpty

keyValueMap​

undocumented

Definition​

get keyValueMap(): RMap<K, V>;

length​

Returns 0 for the length of the collection.

Definition​

get length(): 0;

Overrides​

EmptyBase.length

size​

undocumented

Definition​

get size(): 0;

Overrides​

EmptyBase.size

valueKeyMap​

undocumented

Definition​

get valueKeyMap(): RMap<V, K>;

Methods​

[Symbol.iterator]​

Returns an empty iterator.

Definition​

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

Overrides​

EmptyBase.[Symbol.iterator]

addEntries​

undocumented

Definition​

addEntries(entries: StreamSource<readonly [K, V]>): BiMap.NonEmpty<K, V>;

Parameters​

NameTypeDescription
entriesStreamSource<readonly [K, V]>

addEntry​

undocumented

Definition​

addEntry(entry: readonly [K, V]): BiMap.NonEmpty<K, V>;

Parameters​

NameTypeDescription
entryreadonly [K, V]

assumeNonEmpty​

Throws a RimbuError.EmptyCollectionAssumedNonEmptyError, since the collection is empty.

Definition​

assumeNonEmpty(): never;

throws

RimbuError.EmptyCollectionAssumedNonEmptyError

Overrides​

EmptyBase.assumeNonEmpty

filter​

Returns this, since filtering an empty collection is still empty.

Definition​

filter(): any;

Overrides​

EmptyBase.filter

forEach​

Performs no action, since there are no elements.

Definition​

forEach(): void;

Overrides​

EmptyBase.forEach

getKey​

undocumented

Definition​

getKey<_, O>(value: V, otherwise?: OptLazy<O>): O;

Type parameters​

NameDescription
_
O

Parameters​

NameTypeDescription
valueV
otherwiseOptLazy<O>

getValue​

undocumented

Definition​

getValue<_, O>(key: K, otherwise?: OptLazy<O>): O;

Type parameters​

NameDescription
_
O

Parameters​

NameTypeDescription
keyK
otherwiseOptLazy<O>

hasKey​

undocumented

Definition​

hasKey(): false;

hasValue​

undocumented

Definition​

hasValue(): false;

nonEmpty​

Returns false, keeping the type narrowed to the empty variant.

Definition​

nonEmpty(): this is this['_NonEmptyType'];

Overrides​

EmptyBase.nonEmpty

remove​

Returns this, since removing from an empty collection has no effect.

Definition​

remove(): any;

Overrides​

EmptyBase.remove

removeKey​

undocumented

Definition​

removeKey(): this;

removeKeyAndGet​

undocumented

Definition​

removeKeyAndGet(): undefined;

removeKeys​

undocumented

Definition​

removeKeys(): this;

removeValue​

undocumented

Definition​

removeValue(): this;

removeValueAndGet​

undocumented

Definition​

removeValueAndGet(): undefined;

removeValues​

undocumented

Definition​

removeValues(): this;

set​

undocumented

Definition​

set(key: K, value: V): BiMap.NonEmpty<K, V>;

Parameters​

NameTypeDescription
keyK
valueV

stream​

Returns an empty Stream.

Definition​

stream(): Stream<any>;

Overrides​

EmptyBase.stream

streamKeys​

undocumented

Definition​

streamKeys(): Stream<K>;

streamValues​

undocumented

Definition​

streamValues(): Stream<V>;

toArray​

Returns an empty array.

Definition​

toArray(): [];

Overrides​

EmptyBase.toArray

toBuilder​

undocumented

Definition​

toBuilder(): BiMap.Builder<K, V>;

toJSON​

undocumented

Definition​

toJSON(): ToJSON<(readonly [K, V])[], this['context']['typeTag']>;

toString​

undocumented

Definition​

toString(): string;

updateKeyAtValue​

undocumented

Definition​

updateKeyAtValue(): this;

updateValueAtKey​

undocumented

Definition​

updateValueAtKey(): this;