abstract class SortedSetNode<T>
undocumented
Implements: SortedSet.NonEmpty<T>
Extended by: SortedSetInner<T>
, SortedSetLeaf<T>
Type parameters
Name | Description |
---|---|
T | undocumented |
Properties
_NonEmptyType
undocumented
_NonEmptyType
Definition
_NonEmptyType:
SortedSetNode
<T>;
context
undocumented
context
isEmpty
Returns false since this collection is known to be non-empty
isEmpty
size
undocumented
size
Methods
[Symbol.iterator]
Returns a FastIterator
instance used to iterate over the values of this Iterable
.
[Symbol.iterator]
FastIterator
instance used to iterate over the values of this Iterable
.add
undocumented
add
addAll
undocumented
addAll
Definition
addAll(values:
StreamSource
<T>):
SortedSet.NonEmpty
<T>;
Parameters
Name | Type | Description |
---|---|---|
values | StreamSource <T> |
Overrides
addInternal
undocumented
addInternal
asNormal
undocumented
asNormal
assumeNonEmpty
Returns a self reference since this collection is known to be non-empty.
assumeNonEmpty
difference
undocumented
difference
Definition
difference(other:
StreamSource
<T>):
SortedSet
<T>;
Parameters
Name | Type | Description |
---|---|---|
other | StreamSource <T> |
Overrides
drop
undocumented
drop
filter
undocumented
filter
forEach
undocumented
forEach
Definition
abstract forEach(f: (value: T, index: number, halt: () => void) => void, options?: {
state?:
TraverseState
;
}): void;
Parameters
Name | Type | Description |
---|---|---|
f | (value: T, index: number, halt: () => void) => void | |
options | { state?: TraverseState ; } |
Overrides
getAtIndex
Returns the value at the given index of the value sort order of the SortedSet, or a fallback value (default: undefined) if the index is out of bounds.
getAtIndex
Definitions
getAtIndex(index: number): T
|
undefined;
getAtIndex<O>(index: number, otherwise:
OptLazy
<O>): T
|
O;
Parameters
Name | Type | Description |
---|---|---|
index | number | the index in the key sort order |
negative index values will retrieve the values from the end of the sort order, e.g. -1 is the last value
const m = SortedSet.of('b', 'd', 'a', 'c').asNormal();
console.log(m.getAtIndex(1))
// => 'b'
console.log(m.getAtIndex(-1))
// => 'd'
console.log(m.getAtIndex(10))
// => undefined
console.log(m.getAtIndex(10, 'q'))
// => 'q'
Overrides
getInsertIndexOf
undocumented
getInsertIndexOf
getSliceRange
undocumented
getSliceRange
has
undocumented
has
intersect
undocumented
intersect
Definition
intersect(other:
StreamSource
<T>):
SortedSet
<T>;
Parameters
Name | Type | Description |
---|---|---|
other | StreamSource <T> |
Overrides
max
undocumented
max
min
undocumented
min
nonEmpty
Returns true since this collection is know to be non-empty
nonEmpty
remove
undocumented
remove
removeAll
undocumented
removeAll
Definition
removeAll<U>(values:
StreamSource
<
RelatedTo
<T, U>>):
SortedSet
<T>;
Type parameters
Name | Description |
---|---|
U |
Parameters
Name | Type | Description |
---|---|---|
values | StreamSource < RelatedTo <T, U>> |
Overrides
removeInternal
undocumented
removeInternal
slice
undocumented
slice
sliceIndex
undocumented
sliceIndex
stream
undocumented
stream
Definition
abstract stream(options?: {
reversed?: boolean;
}):
Stream.NonEmpty
<T>;
Parameters
Name | Type | Description |
---|---|---|
options | { reversed?: boolean; } |
Overrides
streamRange
undocumented
streamRange
streamSliceIndex
undocumented
streamSliceIndex
symDifference
undocumented
symDifference
Definition
symDifference(other:
StreamSource
<T>):
SortedSet
<T>;
Parameters
Name | Type | Description |
---|---|---|
other | StreamSource <T> |
Overrides
take
undocumented
take
toArray
undocumented
toArray
toBuilder
undocumented
toBuilder
toJSON
undocumented
toJSON
toString
undocumented
toString
union
undocumented
union
Definition
union(other:
StreamSource
<T>):
SortedSet
<T>
|
any;
Parameters
Name | Type | Description |
---|---|---|
other | StreamSource <T> |