Remove the element of the specified key.
Whether erase successfully.
The key you want to remove.
Optional
isObject: booleanTell us if the type of inserted key is object
to improve efficiency.
If a undefined
value is passed in, the type will be automatically judged.
Removes element by iterator and move iter
to next.
The next iterator.
container.eraseElementByIterator(container.begin());
container.eraseElementByIterator(container.end()); // throw a RangeError
The iterator you want to erase.
Iterator pointing to the beginning element.
const begin = container.begin();
const end = container.end();
for (const it = begin; !it.equals(end); it.next()) {
doSomething(it.pointer);
}
Iterator pointing to the super end like c++.
const begin = container.begin();
const end = container.end();
for (const it = begin; !it.equals(end); it.next()) {
doSomething(it.pointer);
}
Iterator pointing to the end element.
const rBegin = container.rBegin();
const rEnd = container.rEnd();
for (const it = rBegin; !it.equals(rEnd); it.next()) {
doSomething(it.pointer);
}
Iterator pointing to the super begin like c++.
const rBegin = container.rBegin();
const rEnd = container.rEnd();
for (const it = rBegin; !it.equals(rEnd); it.next()) {
doSomething(it.pointer);
}
Insert element to set.
The size of container after inserting.
The key want to insert.
Optional
isObject: booleanTell us if the type of inserted key is object
to improve efficiency.
If a undefined
value is passed in, the type will be automatically judged.
Check key if exist in container.
An iterator pointing to the element if found, or super end if not found.
The element you want to search.
Optional
isObject: booleanTell us if the type of inserted key is object
to improve efficiency.
If a undefined
value is passed in, the type will be automatically judged.
Iterate over all elements in the container.
container.forEach((element, index) => console.log(element, index));
Readonly
HASH_Unique symbol used to tag object.
Generated using TypeDoc
Returns
The size of the container.
Example