Locator
Represents the placement of a single element in array data structure.
Last updated
Was this helpful?
Represents the placement of a single element in array data structure.
Last updated
Was this helpful?
Unlike , the Locator class instance is stored directly in the data structure (which is array in this case) and used to propagate changes of the element's placement in result of operations. Without it you would lost the index of particular element in the array as soon as it been tossed somehow and had to look up for it again in O(n) instead of constant time access with locator.
Element represented by this locator. This field is read only.
T - Type of elements stored in the data structure this locator belongs to.
Index of the element in its containing array. This field is read only.
Do not use _internal
property from your code. It stays public
because is used by external code in the package realization. But TS does not yet have package
scope limitation level so this seems to be the only option.