> For the complete documentation index, see [llms.txt](https://alex-myznikov.gitbook.io/adsjs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://alex-myznikov.gitbook.io/adsjs/api/maps/splaytreemap.md).

# SplayTreeMap

Sorted map based on a splay binary tree structure.

### new SplayTreeMap()

```typescript
/**
 * Creates an instance of SplayTreeMap.
 *
 * @param iterable Iterable of pairs to create the new map with.
 * @param compare Comparison function for key-value pairs sorting by key. Keys are compared as strings by default.
 */
constructor(iterable: Iterable<[K, V]> = [], compare: CompareFunc<K> = compareAsStrings)
```

Properties and methods of this class are fully compatible with:

{% content-ref url="/pages/-LyFLEuhOjBm1buXr303" %}
[SortedMap](/adsjs/api/maps/sortedmap.md)
{% endcontent-ref %}
