Constructors
constructor
- new SortedList<T>(): SortedList<T>
- new SortedList<T>(source): SortedList<T>
Parameters
- source: Iterable<T, any, any>
- new SortedList<T>(source, comparer): SortedList<T>
Parameters
- source: undefined | null | Iterable<T, any, any>
- comparer: Comparer<T>
Accessors
length
- get length(): number
Returns number
Methods
[iterator]
- [iterator](): Generator<T, void, unknown>
Returns Generator<T, void, unknown>
add
- add(...items): number
Returns number
clear
- clear(): void
Returns void
contains
- contains(item): boolean
Returns boolean
find
- find(predicate): undefined | T
Parameters
- predicate: ((item: T) => boolean)
- (item): boolean
Returns boolean
Returns undefined | T
get
- get(index): undefined | T
Returns undefined | T
peekEnd
- peekEnd(): undefined | T
Returns undefined | T
peekStart
- peekStart(): undefined | T
Returns undefined | T
pop
- pop(): undefined | T
Returns undefined | T
remove
- remove(...items): number
Returns number
shift
- shift(): undefined | T
Returns undefined | T
toArray
- toArray(): T[]
Returns T[]
A list that automatically sorts its items to guarantee that they are always in order