class OrderedMapEmpty<K,V,Tp>
undocumented
Extends: EmptyBase
Implements: OrderedMapBase<K,V,Tp>
Type parameters
| Name | Constraints | Default | Description |
|---|---|---|---|
| K | any | undocumented | |
| V | any | undocumented | |
| Tp | OrderedMapTypes | OrderedMapTypes | undocumented |
Properties
_NonEmptyType
undocumented
_NonEmptyTypecontext
undocumented
contextDefinition
readonly context: WithKeyValue<Tp, K, V>['context'];
isEmpty
Returns true since the collection is empty.
isEmptytrue since the collection is empty.keyOrder
undocumented
keyOrderlength
Returns 0 for the length of the collection.
length0 for the length of the collection.size
Returns 0 for the size of the collection.
size0 for the size of the collection.sourceMap
undocumented
sourceMapMethods
[Symbol.iterator]
Returns an empty iterator.
[Symbol.iterator]addEntries
undocumented
addEntriesDefinition
addEntries(entries: StreamSource<readonly [K, V]>): WithKeyValue<Tp, K, V>['normal'] | any;
Parameters
| Name | Type | Description |
|---|---|---|
entries | StreamSource<readonly [K, V]> |
addEntry
undocumented
addEntryDefinition
addEntry(entry: readonly [K, V]): WithKeyValue<Tp, K, V>['nonEmpty'];
Parameters
| Name | Type | Description |
|---|---|---|
entry | readonly [K, V] |
assumeNonEmpty
Throws a RimbuError.EmptyCollectionAssumedNonEmptyError, since the collection is empty.
assumeNonEmptyRimbuError.EmptyCollectionAssumedNonEmptyError, since the collection is empty.filter
Returns this, since filtering an empty collection is still empty.
filterthis, since filtering an empty collection is still empty.forEach
Performs no action, since there are no elements.
forEachget
undocumented
getmodifyAt
undocumented
modifyAtDefinition
modifyAt(key: K, options: {
ifNew?: OptLazyOr<V, Token>;
}): WithKeyValue<Tp, K, V>['normal'];
Parameters
| Name | Type | Description |
|---|---|---|
key | K | |
options | {ifNew?: OptLazyOr<V, Token>;} |
nonEmpty
Returns false, keeping the type narrowed to the empty variant.
nonEmptyfalse, keeping the type narrowed to the empty variant.remove
Returns this, since removing from an empty collection has no effect.
removethis, since removing from an empty collection has no effect.removeKey
undocumented
removeKeyDefinition
removeKey(): WithKeyValue<Tp, K, V>['normal'];
removeKeys
undocumented
removeKeysDefinition
removeKeys(): WithKeyValue<Tp, K, V>['normal'];
set
undocumented
setDefinition
set(key: K, value: V): WithKeyValue<Tp, K, V>['nonEmpty'];
Parameters
| Name | Type | Description |
|---|---|---|
key | K | |
value | V |
stream
Returns an empty Stream.
streamStream.toArray
Returns an empty array.
toArraytoBuilder
undocumented
toBuilderDefinition
toBuilder(): WithKeyValue<Tp, K, V>['builder'];