range_map 0.2.1

  • README.md
  • CHANGELOG.md
  • Installing
  • Versions
  • 0

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.

Changelog

0.2.1

  • Turn on strong mode and fix warnings and errors. Use
  • Comparable.compareTo instead of > and < operators. range_map now supports any Comparable key without > and < operators defined.

0.2.0

  • Add RangeMap.unmodifiable constructor which returns an UnmodifiableRangeMapView instance.

0.1.0

  • Initial version.

Use this package as a library

1. Depend on it

Add this to your package's pubspec.yaml file:


dependencies:
  range_map: ^0.2.1

2. Install it

You can install packages from the command line:

with pub:


$ pub get

Alternatively, your editor might support pub get. Check the docs for your editor to learn more.

3. Import it

Now in your Dart code, you can use:


import 'package:range_map/range_map.dart';
  
Version Uploaded Documentation Archive
0.2.1 Oct 31, 2016 Go to the documentation of range_map 0.2.1 Download range_map 0.2.1 archive
0.2.0 Oct 12, 2016 Go to the documentation of range_map 0.2.0 Download range_map 0.2.0 archive
0.1.0 Mar 30, 2016 Go to the documentation of range_map 0.1.0 Download range_map 0.1.0 archive
Popularity:
Describes how popular the package is relative to other packages. [more]
0
Health:
Code health derived from static analysis. [more]
0
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
0
Overall:
Weighted score of the above. [more]
0
Learn more about scoring.

The package version is not analyzed, because it does not support Dart 2. Until this is resolved, the package will receive a health and maintenance score of 0.

Issues and suggestions

Support Dart 2 in pubspec.yaml.

The SDK constraint in pubspec.yaml doesn't allow the Dart 2.0.0 release. For information about upgrading it to be Dart 2 compatible, please see https://www.dartlang.org/dart-2#migration.

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=1.0.0 <2.0.0