range_map 0.2.1 copy "range_map: ^0.2.1" to clipboard
range_map: ^0.2.1 copied to clipboard

Dart 1 only

A mapping from disjoint nonempty ranges to values.

range_map #

Build Status

A mapping from disjoint nonempty ranges to values.

Usage #

A simple usage example:

final range = new Range<int>(3, 5); // 3 inclusive, 5 exclusive
final rangeMap = new TreeRangeMap<int, String>();

rangeMap[range] = 'foo';

print('${rangeMap.containsKey(3)}'); // true
print('${rangeMap[3]}'); // 'foo'

print('${rangeMap.containsKey(4)}'); // true
print('${rangeMap[4]}'); // 'foo'

print('${rangeMap.containsKey(5)}'); // false
print('${rangeMap[5]}'); // null

print('${rangeMap.containsKey(6)}'); // false
print('${rangeMap[6]}'); // null

Features and bugs #

Please file feature requests and bugs at the issue tracker.

1
likes
40
points
1
downloads

Publisher

unverified uploader

Weekly Downloads

A mapping from disjoint nonempty ranges to values.

Repository (GitHub)
View/report issues

License

BSD-3-Clause (license)

Dependencies

quiver_hashcode, quiver_iterables

More

Packages that depend on range_map