vy_range_collection 0.2.0

  • README.md
  • CHANGELOG.md
  • Installing
  • Versions
  • 59

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.

Changelog

0.2.0

  • Strong mode compliance

0.1.0

  • Initial version

1. Depend on it

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


dependencies:
  vy_range_collection: "^0.2.0"

2. Install it

You can install packages from the command line:

with pub:


$ pub get

with Flutter:


$ flutter packages get

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

3. Import it

Now in your Dart code, you can use:


import 'package:vy_range_collection/vy_range_collection.dart';
        
Version Uploaded Documentation Archive
0.2.0 Sep 12, 2017 Go to the documentation of vy_range_collection 0.2.0 Download vy_range_collection 0.2.0 archive

Analysis

We analyzed this package on Apr 23, 2018, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.0.0-dev.49.0
  • pana: 0.10.6

Scores

Popularity:
Describes how popular the package is relative to other packages. [more]
22 / 100
Health:
Code health derived from static analysis. [more]
93 / 100
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
99 / 100
Overall score:
Weighted score of the above. [more]
59
Learn more about scoring.

Platforms

Detected platforms: Flutter, web, other

No platform restriction found in primary library package:vy_range_collection/vy_range_collection.dart.

Suggestions

  • Fix analysis and formatting issues.

    Analysis or formatting checks reported 2 errors 11 hints.

    Strong-mode analysis of lib/src/range_collection/skip_list_range_set.dart failed with the following error:

    line: 140 col: 48
    The method tear-off 'compare' has type '(Comparable<dynamic>, Comparable<dynamic>) → int' that isn't of expected type '(dynamic, dynamic) → int'. This means its parameter or return type does not match what is expected.

    Run dartfmt to format lib/src/range_collection/bound_type.dart.

    Similar analysis of the following files failed:

    • lib/src/range_collection/cut.dart (hint)
    • lib/src/range_collection/range.dart (hint)
    • lib/src/range_collection/range_map.dart (hint)
    • lib/vy_range_collection.dart (hint)
  • The description is too short.

    Add more detail about the package, what it does and what is its target use case. Try to write at least 60 characters.

  • Package is pre-v1 release.

    While there is nothing inherently wrong with versions of 0.*.*, it usually means that the author is still experimenting with the general direction API.

  • Maintain an example.

    None of the files in your example/ directory matches a known example patterns. Common file name patterns include: main.dart, example.dart or you could also use vy_range_collection.dart.

  • Use analysis_options.yaml.

    Rename old .analysis_options file to analysis_options.yaml.

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=1.24.2 <2.0.0
interval_skip_list >=0.0.3 <0.1.0 0.0.3 0.1.0
quiver_check >=1.0.0 <1.1.0 1.0.0
quiver_iterables >=1.0.0 <1.1.0 1.0.1
Transitive dependencies
meta 1.1.2
Dev dependencies
test >=0.12.0 <0.13.0