Skip to main content

class BiMapNonEmptyImpl<K,V>

undocumented

Extends: NonEmptyBase<E>

Implements: BiMap.NonEmpty<K,V>

Type parameters

NameDescription
Kundocumented
Vundocumented

Properties

context

undocumented

Definition

readonly context: BiMapContext<K, V>;

Overrides

BiMap.context

isEmpty

Returns false since this collection is known to be non-empty.

Definition

readonly isEmpty: false;

example
BiMap.of([1, 1], [2, 2]).isEmpty   // => false

Overrides

BiMap.isEmptyNonEmpty.isEmptyNonEmptyBase.isEmpty

keyValueMap

undocumented

Definition

readonly keyValueMap: RMap.NonEmpty<K, V>;

Overrides

NonEmpty.keyValueMap

size

undocumented

Definition

get size(): number;

Overrides

BiMap.size

valueKeyMap

undocumented

Definition

readonly valueKeyMap: RMap.NonEmpty<V, K>;

Overrides

NonEmpty.valueKeyMap

Methods

[Symbol.iterator]

undocumented

addEntries

undocumented

Definition

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

Parameters

NameTypeDescription
entriesStreamSource<readonly [K, V]>

Overrides

NonEmpty.addEntries

addEntry

undocumented

Definition

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

Parameters

NameTypeDescription
entryreadonly [K, V]

Overrides

BiMap.addEntry

asNormal

undocumented

Definition

asNormal(): this;

Overrides

NonEmpty.asNormal, NonEmptyBase.asNormal

assumeNonEmpty

Returns a self reference since this collection is known to be non-empty.

Definition

assumeNonEmpty(): this;

example
const m = BiMap.of([1, 1], [2, 2]);
m === m.assumeNonEmpty() // => true

Overrides

BiMap.assumeNonEmpty, NonEmpty.assumeNonEmpty, NonEmptyBase.assumeNonEmpty

copy

undocumented

Definition

copy(keyValueMap?: RMap.NonEmpty<K, V>, valueKeyMap?: RMap.NonEmpty<V, K>): BiMap.NonEmpty<K, V>;

Parameters

NameTypeDescription
keyValueMapRMap.NonEmpty<K, V>
valueKeyMapRMap.NonEmpty<V, K>

copyE

undocumented

Definition

copyE(keyValueMap?: RMap<K, V>, valueKeyMap?: RMap<V, K>): BiMap<K, V>;

Parameters

NameTypeDescription
keyValueMapRMap<K, V>
valueKeyMapRMap<V, K>

filter

undocumented

Definition

filter(pred: (entry: readonly [K, V], index: number, halt: () => void) => boolean): BiMap<K, V>;

Parameters

NameTypeDescription
pred(entry: readonly [K, V], index: number, halt: () => void) => boolean

Overrides

BiMap.filter

forEach

undocumented

Definition

forEach(f: (entry: readonly [K, V], index: number, halt: () => void) => void, state?: TraverseState): void;

Parameters

NameTypeDescription
f(entry: readonly [K, V], index: number, halt: () => void) => void
stateTraverseState

Overrides

BiMap.forEach

getKey

undocumented

Definition

getKey<UV, O>(value: RelatedTo<V, UV>, otherwise?: OptLazy<O>): K | O;

Type parameters

NameDescription
UV
O

Parameters

NameTypeDescription
valueRelatedTo<V, UV>
otherwiseOptLazy<O>

Overrides

BiMap.getKey

getValue

undocumented

Definition

getValue<UK, O>(key: RelatedTo<K, UK>, otherwise?: OptLazy<O>): V | O;

Type parameters

NameDescription
UK
O

Parameters

NameTypeDescription
keyRelatedTo<K, UK>
otherwiseOptLazy<O>

Overrides

BiMap.getValue

hasKey

undocumented

Definition

hasKey<UK>(key: RelatedTo<K, UK>): boolean;

Type parameters

NameDescription
UK

Parameters

NameTypeDescription
keyRelatedTo<K, UK>

Overrides

BiMap.hasKey

hasValue

undocumented

Definition

hasValue<UV>(value: RelatedTo<V, UV>): boolean;

Type parameters

NameDescription
UV

Parameters

NameTypeDescription
valueRelatedTo<V, UV>

Overrides

BiMap.hasValue

nonEmpty

Returns true since this collection is known to be non-empty

Definition

nonEmpty(): true;

example
BiMap.of([1, 1], [2, 2]).nonEmpty()   // => true

Overrides

BiMap.nonEmpty, NonEmpty.nonEmpty, NonEmptyBase.nonEmpty

removeKey

undocumented

Definition

removeKey<UK>(key: RelatedTo<K, UK>): BiMap<K, V>;

Type parameters

NameDescription
UK

Parameters

NameTypeDescription
keyRelatedTo<K, UK>

Overrides

BiMap.removeKey

removeKeyAndGet

undocumented

Definition

removeKeyAndGet<UK>(key: RelatedTo<K, UK>): [BiMap<K, V>, V] | undefined;

Type parameters

NameDescription
UK

Parameters

NameTypeDescription
keyRelatedTo<K, UK>

Overrides

BiMap.removeKeyAndGet

removeKeys

undocumented

Definition

removeKeys<UK>(keys: Stream<RelatedTo<K, UK>>): BiMap<K, V>;

Type parameters

NameDescription
UK

Parameters

NameTypeDescription
keysStream<RelatedTo<K, UK>>

Overrides

BiMap.removeKeys

removeValue

undocumented

Definition

removeValue<UV>(value: RelatedTo<V, UV>): BiMap<K, V>;

Type parameters

NameDescription
UV

Parameters

NameTypeDescription
valueRelatedTo<V, UV>

Overrides

BiMap.removeValue

removeValueAndGet

undocumented

Definition

removeValueAndGet<UV>(value: RelatedTo<V, UV>): [BiMap<K, V>, K] | undefined;

Type parameters

NameDescription
UV

Parameters

NameTypeDescription
valueRelatedTo<V, UV>

Overrides

BiMap.removeValueAndGet

removeValues

undocumented

Definition

removeValues<UV>(values: Stream<RelatedTo<V, UV>>): BiMap<K, V>;

Type parameters

NameDescription
UV

Parameters

NameTypeDescription
valuesStream<RelatedTo<V, UV>>

Overrides

BiMap.removeValues

set

undocumented

Definition

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

Parameters

NameTypeDescription
keyK
valueV

Overrides

BiMap.set

stream

undocumented

Definition

stream(): Stream.NonEmpty<readonly [K, V]>;

Overrides

NonEmpty.stream, NonEmptyBase.stream

streamKeys

undocumented

Definition

streamKeys(): Stream.NonEmpty<K>;

Overrides

NonEmpty.streamKeys

streamValues

undocumented

Definition

streamValues(): Stream.NonEmpty<V>;

Overrides

NonEmpty.streamValues

toArray

undocumented

Definition

toArray(): ArrayNonEmpty<readonly [K, V]>;

Overrides

NonEmpty.toArray

toBuilder

undocumented

Definition

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

Overrides

BiMap.toBuilder

toJSON

undocumented

Definition

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

Overrides

BiMap.toJSON

toString

undocumented

Definition

toString(): string;

Overrides

BiMap.toString

updateKeyAtValue

undocumented

Definition

updateKeyAtValue(keyUpdate: Update<K>, value: V): BiMap.NonEmpty<K, V>;

Parameters

NameTypeDescription
keyUpdateUpdate<K>
valueV

Overrides

NonEmpty.updateKeyAtValue

updateValueAtKey

undocumented

Definition

updateValueAtKey(key: K, valueUpdate: Update<V>): BiMap.NonEmpty<K, V>;

Parameters

NameTypeDescription
keyK
valueUpdateUpdate<V>

Overrides

NonEmpty.updateValueAtKey