ordered_set 0.1.0 copy "ordered_set: ^0.1.0" to clipboard
ordered_set: ^0.1.0 copied to clipboard

outdatedDart 1 only

A simple implementation for an ordered set

ordered_set #

Build Status Coverage Status

A simple implementation for an ordered set for Dart.

It accepts a compare function that compares items for their priority.

Unlike Dart's SplayTreeSet, it allows for several different elements with the same priority to be added.

It also implements Iterable, so you can iterate it in O(n).

Usage #

A simple usage example:

  import 'package:ordered_set/ordered_set.dart';

  main() {
    OrderedSet<int> items = new OrderedSet();
    print(items.toList()); // [1, 2]

Contributing #

All contributions are very welcome! Please feel free to create Issues, help us with PR's or comment your suggestions, feature requests, bugs, et cetera. Give us a star if you liked it!