Returns a copy of the tree with items removed whenever the callback function returns false.
A function to call for each item in the set.
The second parameter to callback exists because ISetF
is a subinterface of IMapF. If the object is a map, v
is the value associated with the key, otherwise v could be
undefined or another copy of the third parameter (counter).
OptionalreturnThisIfUnchanged: booleanCalls callbackFn once for each key-value pair present in the map object. The ES6 Map class sends the value to the callback before the key, so this interface must do likewise.
OptionalthisArg: anyCalls callback on the specified range of keys, in ascending order by key.
The first key scanned will be greater than or equal to low.
Scanning stops when a key larger than this is reached.
If the high key is present in the map, onFound is called
for that final pair if and only if this parameter is true.
OptionalonFound: (k: K, v: V, counter: number) => void
A function that is called for each key pair. Because this is a subinterface of ISortedMapSource, if there is a value associated with the key, it is passed as the second parameter.
OptionalinitialCounter: number
Initial third argument of onFound. This value
increases by one each time onFound is called. Default: 0
Number of pairs found and the number of times onFound was called.
Builds an array of pairs from the specified range of keys, sorted by key. Each returned pair is also an array: pair[0] is the key, pair[1] is the value.
The first key in the array will be greater than or equal to low.
This method returns when a key larger than this is reached.
OptionalincludeHigh: boolean
If the high key is present in the map, its pair will be
included in the output if and only if this parameter is true. Note:
if the low key is present, it is always included in the output.
OptionalmaxLength: number
Maximum length of the returned array (default: unlimited)
Returns a boolean asserting whether the key exists in the map object or not.
Gets the highest key in the collection.
Gets the lowest key in the collection.
Returns a copy of the set with the specified key included.
Returns a copy of the set with the specified key included.
Returns a copy of the tree with all the keys in the specified array present.
The keys to add.
OptionalreturnThisIfUnchanged: boolean
If true, the method returns this when
all of the keys are already present in the collection. The
default value may be true or false depending on the concrete
implementation of the interface (in BTree, the default is false.)
Returns a copy of the set with the specified key removed.
Returns a copy of the tree with all the keys in the specified array removed.
OptionalreturnThisIfUnchanged: booleanReturns a copy of the tree with the specified range of keys removed.
An interface for a functional sorted set: a functional set in which the keys (items) are sorted. This is a subinterface of ISortedMapF.