class SortedSetInner<T>
undocumented
Extends: SortedSetNode<T>
Type parameters
Name | Description |
---|---|
T | undocumented |
Properties
_NonEmptyType
undocumented
_NonEmptyType
children
undocumented
children
Definition
children: readonly
SortedSetNode
<T>[];
context
undocumented
context
isEmpty
Returns false since this collection is known to be non-empty
isEmpty
mutateChildren
undocumented
mutateChildren
Definition
get mutateChildren():
SortedSetNode
<T>[];
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
Returns the collection with given value
added.
add
value
added.Definition
add(value: T):
SortedSet.NonEmpty
<T>;
Parameters
Name | Type | Description |
---|---|---|
value | T |
HashSet.of(1, 2, 3).add(10).toArray() // => [1, 2, 3, 10]
Overrides
addAll
Returns the collection with the values in given values
StreamSource
added.
addAll
values
StreamSource
added.Definition
addAll(values:
StreamSource
<T>):
SortedSet.NonEmpty
<T>;
Parameters
Name | Type | Description |
---|---|---|
values | StreamSource <T> |
HashSet.of(1, 2, 3).addAll(10, 11).toArray() // => [1, 2, 3, 10, 11]
Overrides
addInternal
undocumented
addInternal
asNormal
undocumented
asNormal
assumeNonEmpty
Returns a self reference since this collection is known to be non-empty.
assumeNonEmpty
copy
undocumented
copy
Definition
copy(entries?: readonly T[], children?: readonly
SortedSetNode
<T>[], size?: number):
SortedSetInner
<T>;
Parameters
Name | Type | Description |
---|---|---|
entries | readonly T[] | |
children | readonly SortedSetNode <T>[] | |
size | number |
deleteMax
undocumented
deleteMax
Definition
deleteMax(): [T,
SortedSetInner
<T>];
deleteMin
undocumented
deleteMin
Definition
deleteMin(): [T,
SortedSetInner
<T>];
difference
undocumented
difference
Definition
difference(other:
StreamSource
<T>):
SortedSet
<T>;
Parameters
Name | Type | Description |
---|---|---|
other | StreamSource <T> |
Overrides
drop
Returns a SortedSet containing all but the the first amount
of value of this SortedSet.
drop
amount
of value of this SortedSet.Definition
drop(amount: number):
SortedSet
<T>;
Parameters
Name | Type | Description |
---|---|---|
amount | number |
a negative amount
drops the last values instead of the first, e.g. -2 is the last 2 elements
const m = SortedSet.of('b', 'd', 'a', 'c').asNormal();
console.log(m.drop(2).toArray())
// => ['c', 'd']
console.log(m.drop(-2).toArray())
// => ['a', 'b']
Overrides
dropInternal
undocumented
dropInternal
Definition
dropInternal(amount: number):
SortedSetNode
<T>;
Parameters
Name | Type | Description |
---|---|---|
amount | number |
filter
undocumented
filter
forEach
undocumented
forEach
Definition
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
undocumented
getAtIndex
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
mutateGetFromLeft
undocumented
mutateGetFromLeft
Definition
mutateGetFromLeft(left:
SortedSetInner
<T>, toMe: T): [T,
SortedSetInner
<T>];
Parameters
Name | Type | Description |
---|---|---|
left | SortedSetInner <T> | |
toMe | T |
mutateGetFromRight
undocumented
mutateGetFromRight
Definition
mutateGetFromRight(right:
SortedSetInner
<T>, toMe: T): [T,
SortedSetInner
<T>];
Parameters
Name | Type | Description |
---|---|---|
right | SortedSetInner <T> | |
toMe | T |
mutateGiveToLeft
undocumented
mutateGiveToLeft
Definition
mutateGiveToLeft(left:
SortedSetInner
<T>, toLeft: T): [T,
SortedSetInner
<T>];
Parameters
Name | Type | Description |
---|---|---|
left | SortedSetInner <T> | |
toLeft | T |
mutateGiveToRight
undocumented
mutateGiveToRight
Definition
mutateGiveToRight(right:
SortedSetInner
<T>, toRight: T): [T,
SortedSetInner
<T>];
Parameters
Name | Type | Description |
---|---|---|
right | SortedSetInner <T> | |
toRight | T |
mutateJoinLeft
undocumented
mutateJoinLeft
Definition
mutateJoinLeft(left:
SortedSetInner
<T>, entry: T): void;
Parameters
Name | Type | Description |
---|---|---|
left | SortedSetInner <T> | |
entry | T |
mutateJoinRight
undocumented
mutateJoinRight
Definition
mutateJoinRight(right:
SortedSetInner
<T>, entry: T): void;
Parameters
Name | Type | Description |
---|---|---|
right | SortedSetInner <T> | |
entry | T |
mutateSplitRight
undocumented
mutateSplitRight
Definition
mutateSplitRight(index?: number): [T,
SortedSetInner
<T>];
Parameters
Name | Type | Description |
---|---|---|
index | number |
nonEmpty
Returns true since this collection is know to be non-empty
nonEmpty
normalize
undocumented
normalize
normalizeDownsizeChild
undocumented
normalizeDownsizeChild
Definition
normalizeDownsizeChild(childIndex: number, newChild:
SortedSetNode
<T>, newSize: number):
SortedSetInner
<T>;
Parameters
Name | Type | Description |
---|---|---|
childIndex | number | |
newChild | SortedSetNode <T> | |
newSize | number |
normalizeIncreaseChild
undocumented
normalizeIncreaseChild
Definition
normalizeIncreaseChild(childIndex: number, newChild:
SortedSetNode
<T>, newSize: number):
SortedSetInner
<T>;
Parameters
Name | Type | Description |
---|---|---|
childIndex | number | |
newChild | SortedSetNode <T> | |
newSize | number |
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
Definition
removeInternal(value: T):
SortedSetNode
<T>;
Parameters
Name | Type | Description |
---|---|---|
value | T |
Overrides
slice
Returns a SortedSet containing only those values that are within the given keyRange
.
slice
keyRange
.sliceIndex
Returns a SortedSet containing only those values that are within the given range
index range of the value sort order.
sliceIndex
range
index range of the value sort order.stream
undocumented
stream
Definition
stream(options?: {
reversed?: boolean;
}):
Stream.NonEmpty
<T>;
Parameters
Name | Type | Description |
---|---|---|
options | { reversed?: boolean; } |
Overrides
streamRange
Returns a Stream of sorted values of this collection within the given keyRange
.
streamRange
keyRange
.streamSliceIndex
undocumented
streamSliceIndex
symDifference
Returns a collection of the values that are either in this collection or in the other
StreamSource
, but not in both.
symDifference
other
StreamSource
, but not in both.Definition
symDifference(other:
StreamSource
<T>):
SortedSet
<T>;
Parameters
Name | Type | Description |
---|---|---|
other | StreamSource <T> |
HashSet.of(1, 2, 3).symDifference([2, 4]).toArray()
// => [1, 3, 4]
Overrides
take
undocumented
take
takeInternal
undocumented
takeInternal
Definition
takeInternal(amount: number):
SortedSetNode
<T>;
Parameters
Name | Type | Description |
---|---|---|
amount | number |
toArray
undocumented
toArray
toBuilder
Returns a builder object containing the values of this collection.
toBuilder
Definition
toBuilder():
SortedSet.Builder
<T>;
const builder: HashSet.Builder<number> = HashSet.of(1, 2, 3).toBuilder()
Overrides
toJSON
undocumented
toJSON
toString
undocumented
toString
union
Returns a collection containing all values from this collection and all values of given other
StreamSource
.
union
other
StreamSource
.Definition
union(other:
StreamSource
<T>):
SortedSet
<T>
|
any;
Parameters
Name | Type | Description |
---|---|---|
other | StreamSource <T> |
HashSet.of(1, 2, 3).union(HashSet.of(2, 4, 6)).toArray()
// => [1, 2, 3, 4, 6]