vy_range_collection 0.2.0 copy "vy_range_collection: ^0.2.0" to clipboard
vy_range_collection: ^0.2.0 copied to clipboard

discontinued
Dart 1 only

A collection library for range.

vy_range_collection #

Fork from range_collection by kseo #

A collection library for Range data type. This project is heavily inspired by Guava's Range, RangeSet and RangeMap classes. Forked because it seems no more maintained.

Build Status Coverage Status

Usage #

A simple usage example:

import 'package:vy_range_collection/vy_range_collection.dart';

main() {
  RangeSet<int> rangeSet = new SkipListRangeSet<int>();
  rangeSet.add(new Range.closed(1, 10));
  print(rangeSet); // {[1, 10]}

  rangeSet.add(new Range.closedOpen(11, 15));
  print(rangeSet); // disconnected range; {[1, 10], [11, 15)}

  rangeSet.add(new Range.closedOpen(15, 20));
  print(rangeSet); // connected range; {[1, 10], [11, 20)}

  rangeSet.add(new Range.openClosed(0, 0));
  print(rangeSet); // empty range; {[1, 10], [11, 20)}

  rangeSet.remove(new Range.open(5, 10));
  print(rangeSet); // splits [1, 10]; {[1, 5], [10, 10], [11, 20)}}
}

Features and bugs #

Please file feature requests and bugs at the issue tracker.

0
likes
20
pub points
0%
popularity

Publisher

unverified uploader

A collection library for range.

Repository (GitHub)
View/report issues

License

BSD-3-Clause (LICENSE)

Dependencies

interval_skip_list, quiver_check, quiver_iterables

More

Packages that depend on vy_range_collection