graph-builder
Version:
A graph builder library for modeling abstract graph structures.
19 lines (12 loc) • 579 B
Markdown
[Home](./index) > [graph-builder](./graph-builder.md) > [ElementOrder](./graph-builder.elementorder.md) > [sorted](./graph-builder.elementorder.sorted.md)
# ElementOrder.sorted method
Returns an instance which specifies that the ordering of the elements is guaranteed to be determined by `comparator`<!-- -->.
**Signature:**
```javascript
static sorted<S>(comparator: Comparator<S>): ElementOrder<S>;
```
**Returns:** `ElementOrder<S>`
## Parameters
| Parameter | Type | Description |
| --- | --- | --- |
| `comparator` | `Comparator<S>` | |