TST#clear

This commit is contained in:
Johannes Rieken
2017-10-06 17:07:07 +02:00
parent 5c109769f0
commit 737f55bb2f

View File

@@ -323,6 +323,10 @@ export class TernarySearchTree<E> {
this._segments = segments;
}
clear(): void {
this._root = undefined;
}
set(key: string, element: E): void {
const segements = this._segments.reset(key);
this._root = this._set(this._root, segements.next(), segements, element);