Skip to content

[C] DuplicateTracker

Helper class to track duplicate instance

Type Parameters

Type Parameter
K
V

Constructors

new DuplicateTracker()

new DuplicateTracker<K, V>(): DuplicateTracker<K, V>

Returns

DuplicateTracker<K, V>

Methods

entries()

entries(): Iterable<[K, V[]], any, any>

Return iterator of all the duplicate entries.

Returns

Iterable<[K, V[]], any, any>


track()

track(k, v): void

Track usage of K.

Parameters

ParameterTypeDescription
kKkey that is being checked for duplicate.
vVvalue that map to the key

Returns

void