[roll] Update third-party dart packages
Updated:
Change-Id: I41b9c4bb29de4e9e6578d7687035a5577d1e2476
diff --git a/lists/.idea/encodings.xml b/lists/.idea/encodings.xml
deleted file mode 100755
index f13fa33..0000000
--- a/lists/.idea/encodings.xml
+++ /dev/null
@@ -1,4 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project version="4">
- <component name="Encoding" addBOMForNewFiles="with NO BOM" />
-</project>
\ No newline at end of file
diff --git a/lists/.idea/libraries/Dart_Packages.xml b/lists/.idea/libraries/Dart_Packages.xml
deleted file mode 100755
index 728589f..0000000
--- a/lists/.idea/libraries/Dart_Packages.xml
+++ /dev/null
@@ -1,412 +0,0 @@
-<component name="libraryTable">
- <library name="Dart Packages" type="DartPackagesLibraryType">
- <properties>
- <option name="packageNameToDirsMap">
- <entry key="analyzer">
- <value>
- <list>
- <option value="$USER_HOME$/AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/analyzer-0.30.0+4/lib" />
- </list>
- </value>
- </entry>
- <entry key="args">
- <value>
- <list>
- <option value="$USER_HOME$/AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/args-1.5.1/lib" />
- </list>
- </value>
- </entry>
- <entry key="async">
- <value>
- <list>
- <option value="$USER_HOME$/AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/async-1.13.3/lib" />
- </list>
- </value>
- </entry>
- <entry key="barback">
- <value>
- <list>
- <option value="$USER_HOME$/AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/barback-0.15.2+15/lib" />
- </list>
- </value>
- </entry>
- <entry key="boolean_selector">
- <value>
- <list>
- <option value="$USER_HOME$/AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/boolean_selector-1.0.3/lib" />
- </list>
- </value>
- </entry>
- <entry key="charcode">
- <value>
- <list>
- <option value="$USER_HOME$/AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/charcode-1.1.2/lib" />
- </list>
- </value>
- </entry>
- <entry key="cli_util">
- <value>
- <list>
- <option value="$USER_HOME$/AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/cli_util-0.1.3/lib" />
- </list>
- </value>
- </entry>
- <entry key="collection">
- <value>
- <list>
- <option value="$USER_HOME$/AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/collection-1.14.6/lib" />
- </list>
- </value>
- </entry>
- <entry key="convert">
- <value>
- <list>
- <option value="$USER_HOME$/AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/convert-2.1.1/lib" />
- </list>
- </value>
- </entry>
- <entry key="crypto">
- <value>
- <list>
- <option value="$USER_HOME$/AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/crypto-2.0.2+1/lib" />
- </list>
- </value>
- </entry>
- <entry key="csslib">
- <value>
- <list>
- <option value="$USER_HOME$/AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/csslib-0.14.3/lib" />
- </list>
- </value>
- </entry>
- <entry key="front_end">
- <value>
- <list>
- <option value="$USER_HOME$/AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/front_end-0.1.0-alpha.4.1/lib" />
- </list>
- </value>
- </entry>
- <entry key="glob">
- <value>
- <list>
- <option value="$USER_HOME$/AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/glob-1.1.7/lib" />
- </list>
- </value>
- </entry>
- <entry key="html">
- <value>
- <list>
- <option value="$USER_HOME$/AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/html-0.13.3/lib" />
- </list>
- </value>
- </entry>
- <entry key="http">
- <value>
- <list>
- <option value="$USER_HOME$/AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/http-0.11.3+16/lib" />
- </list>
- </value>
- </entry>
- <entry key="http_multi_server">
- <value>
- <list>
- <option value="$USER_HOME$/AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/http_multi_server-2.0.4/lib" />
- </list>
- </value>
- </entry>
- <entry key="http_parser">
- <value>
- <list>
- <option value="$USER_HOME$/AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/http_parser-3.1.2/lib" />
- </list>
- </value>
- </entry>
- <entry key="io">
- <value>
- <list>
- <option value="$USER_HOME$/AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/io-0.3.2+1/lib" />
- </list>
- </value>
- </entry>
- <entry key="isolate">
- <value>
- <list>
- <option value="$USER_HOME$/AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/isolate-1.1.0/lib" />
- </list>
- </value>
- </entry>
- <entry key="js">
- <value>
- <list>
- <option value="$USER_HOME$/AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/js-0.6.1+1/lib" />
- </list>
- </value>
- </entry>
- <entry key="kernel">
- <value>
- <list>
- <option value="$USER_HOME$/AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/kernel-0.3.0-alpha.1.1/lib" />
- </list>
- </value>
- </entry>
- <entry key="logging">
- <value>
- <list>
- <option value="$USER_HOME$/AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/logging-0.11.3+2/lib" />
- </list>
- </value>
- </entry>
- <entry key="matcher">
- <value>
- <list>
- <option value="$USER_HOME$/AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/matcher-0.12.1+4/lib" />
- </list>
- </value>
- </entry>
- <entry key="meta">
- <value>
- <list>
- <option value="$USER_HOME$/AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/meta-1.1.7/lib" />
- </list>
- </value>
- </entry>
- <entry key="mime">
- <value>
- <list>
- <option value="$USER_HOME$/AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/mime-0.9.5/lib" />
- </list>
- </value>
- </entry>
- <entry key="multi_server_socket">
- <value>
- <list>
- <option value="$USER_HOME$/AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/multi_server_socket-1.0.1/lib" />
- </list>
- </value>
- </entry>
- <entry key="node_preamble">
- <value>
- <list>
- <option value="$USER_HOME$/AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/node_preamble-1.4.4/lib" />
- </list>
- </value>
- </entry>
- <entry key="package_config">
- <value>
- <list>
- <option value="$USER_HOME$/AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/package_config-1.0.3/lib" />
- </list>
- </value>
- </entry>
- <entry key="package_resolver">
- <value>
- <list>
- <option value="$USER_HOME$/AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/package_resolver-1.0.2/lib" />
- </list>
- </value>
- </entry>
- <entry key="path">
- <value>
- <list>
- <option value="$USER_HOME$/AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/path-1.5.1/lib" />
- </list>
- </value>
- </entry>
- <entry key="plugin">
- <value>
- <list>
- <option value="$USER_HOME$/AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/plugin-0.2.0+3/lib" />
- </list>
- </value>
- </entry>
- <entry key="pool">
- <value>
- <list>
- <option value="$USER_HOME$/AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/pool-1.3.4/lib" />
- </list>
- </value>
- </entry>
- <entry key="pub_semver">
- <value>
- <list>
- <option value="$USER_HOME$/AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/pub_semver-1.4.2/lib" />
- </list>
- </value>
- </entry>
- <entry key="shelf">
- <value>
- <list>
- <option value="$USER_HOME$/AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/shelf-0.7.3/lib" />
- </list>
- </value>
- </entry>
- <entry key="shelf_packages_handler">
- <value>
- <list>
- <option value="$USER_HOME$/AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/shelf_packages_handler-1.0.4/lib" />
- </list>
- </value>
- </entry>
- <entry key="shelf_static">
- <value>
- <list>
- <option value="$USER_HOME$/AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/shelf_static-0.2.7/lib" />
- </list>
- </value>
- </entry>
- <entry key="shelf_web_socket">
- <value>
- <list>
- <option value="$USER_HOME$/AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/shelf_web_socket-0.2.2/lib" />
- </list>
- </value>
- </entry>
- <entry key="source_map_stack_trace">
- <value>
- <list>
- <option value="$USER_HOME$/AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/source_map_stack_trace-1.1.5/lib" />
- </list>
- </value>
- </entry>
- <entry key="source_maps">
- <value>
- <list>
- <option value="$USER_HOME$/AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/source_maps-0.10.5/lib" />
- </list>
- </value>
- </entry>
- <entry key="source_span">
- <value>
- <list>
- <option value="$USER_HOME$/AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/source_span-1.5.5/lib" />
- </list>
- </value>
- </entry>
- <entry key="stack_trace">
- <value>
- <list>
- <option value="$USER_HOME$/AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/stack_trace-1.9.3/lib" />
- </list>
- </value>
- </entry>
- <entry key="stream_channel">
- <value>
- <list>
- <option value="$USER_HOME$/AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/stream_channel-1.6.6/lib" />
- </list>
- </value>
- </entry>
- <entry key="string_scanner">
- <value>
- <list>
- <option value="$USER_HOME$/AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/string_scanner-1.0.4/lib" />
- </list>
- </value>
- </entry>
- <entry key="term_glyph">
- <value>
- <list>
- <option value="$USER_HOME$/AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/term_glyph-1.1.0/lib" />
- </list>
- </value>
- </entry>
- <entry key="test">
- <value>
- <list>
- <option value="$USER_HOME$/AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/test-0.12.34/lib" />
- </list>
- </value>
- </entry>
- <entry key="typed_data">
- <value>
- <list>
- <option value="$USER_HOME$/AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/typed_data-1.1.5/lib" />
- </list>
- </value>
- </entry>
- <entry key="utf">
- <value>
- <list>
- <option value="$USER_HOME$/AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/utf-0.9.0+3/lib" />
- </list>
- </value>
- </entry>
- <entry key="watcher">
- <value>
- <list>
- <option value="$USER_HOME$/AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/watcher-0.9.7+6/lib" />
- </list>
- </value>
- </entry>
- <entry key="web_socket_channel">
- <value>
- <list>
- <option value="$USER_HOME$/AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/web_socket_channel-1.0.6/lib" />
- </list>
- </value>
- </entry>
- <entry key="yaml">
- <value>
- <list>
- <option value="$USER_HOME$/AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/yaml-2.1.13/lib" />
- </list>
- </value>
- </entry>
- </option>
- </properties>
- <CLASSES>
- <root url="file://$USER_HOME$/AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/analyzer-0.30.0+4/lib" />
- <root url="file://$USER_HOME$/AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/args-1.5.1/lib" />
- <root url="file://$USER_HOME$/AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/async-1.13.3/lib" />
- <root url="file://$USER_HOME$/AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/barback-0.15.2+15/lib" />
- <root url="file://$USER_HOME$/AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/boolean_selector-1.0.3/lib" />
- <root url="file://$USER_HOME$/AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/charcode-1.1.2/lib" />
- <root url="file://$USER_HOME$/AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/cli_util-0.1.3/lib" />
- <root url="file://$USER_HOME$/AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/collection-1.14.6/lib" />
- <root url="file://$USER_HOME$/AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/convert-2.1.1/lib" />
- <root url="file://$USER_HOME$/AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/crypto-2.0.2+1/lib" />
- <root url="file://$USER_HOME$/AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/csslib-0.14.3/lib" />
- <root url="file://$USER_HOME$/AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/front_end-0.1.0-alpha.4.1/lib" />
- <root url="file://$USER_HOME$/AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/glob-1.1.7/lib" />
- <root url="file://$USER_HOME$/AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/html-0.13.3/lib" />
- <root url="file://$USER_HOME$/AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/http-0.11.3+16/lib" />
- <root url="file://$USER_HOME$/AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/http_multi_server-2.0.4/lib" />
- <root url="file://$USER_HOME$/AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/http_parser-3.1.2/lib" />
- <root url="file://$USER_HOME$/AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/io-0.3.2+1/lib" />
- <root url="file://$USER_HOME$/AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/isolate-1.1.0/lib" />
- <root url="file://$USER_HOME$/AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/js-0.6.1+1/lib" />
- <root url="file://$USER_HOME$/AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/kernel-0.3.0-alpha.1.1/lib" />
- <root url="file://$USER_HOME$/AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/logging-0.11.3+2/lib" />
- <root url="file://$USER_HOME$/AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/matcher-0.12.1+4/lib" />
- <root url="file://$USER_HOME$/AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/meta-1.1.7/lib" />
- <root url="file://$USER_HOME$/AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/mime-0.9.5/lib" />
- <root url="file://$USER_HOME$/AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/multi_server_socket-1.0.1/lib" />
- <root url="file://$USER_HOME$/AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/node_preamble-1.4.4/lib" />
- <root url="file://$USER_HOME$/AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/package_config-1.0.3/lib" />
- <root url="file://$USER_HOME$/AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/package_resolver-1.0.2/lib" />
- <root url="file://$USER_HOME$/AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/path-1.5.1/lib" />
- <root url="file://$USER_HOME$/AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/plugin-0.2.0+3/lib" />
- <root url="file://$USER_HOME$/AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/pool-1.3.4/lib" />
- <root url="file://$USER_HOME$/AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/pub_semver-1.4.2/lib" />
- <root url="file://$USER_HOME$/AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/shelf-0.7.3/lib" />
- <root url="file://$USER_HOME$/AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/shelf_packages_handler-1.0.4/lib" />
- <root url="file://$USER_HOME$/AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/shelf_static-0.2.7/lib" />
- <root url="file://$USER_HOME$/AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/shelf_web_socket-0.2.2/lib" />
- <root url="file://$USER_HOME$/AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/source_map_stack_trace-1.1.5/lib" />
- <root url="file://$USER_HOME$/AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/source_maps-0.10.5/lib" />
- <root url="file://$USER_HOME$/AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/source_span-1.5.5/lib" />
- <root url="file://$USER_HOME$/AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/stack_trace-1.9.3/lib" />
- <root url="file://$USER_HOME$/AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/stream_channel-1.6.6/lib" />
- <root url="file://$USER_HOME$/AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/string_scanner-1.0.4/lib" />
- <root url="file://$USER_HOME$/AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/term_glyph-1.1.0/lib" />
- <root url="file://$USER_HOME$/AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/test-0.12.34/lib" />
- <root url="file://$USER_HOME$/AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/typed_data-1.1.5/lib" />
- <root url="file://$USER_HOME$/AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/utf-0.9.0+3/lib" />
- <root url="file://$USER_HOME$/AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/watcher-0.9.7+6/lib" />
- <root url="file://$USER_HOME$/AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/web_socket_channel-1.0.6/lib" />
- <root url="file://$USER_HOME$/AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/yaml-2.1.13/lib" />
- </CLASSES>
- <JAVADOC />
- <SOURCES />
- </library>
-</component>
\ No newline at end of file
diff --git a/lists/.idea/libraries/Dart_SDK.xml b/lists/.idea/libraries/Dart_SDK.xml
deleted file mode 100755
index edc7e75..0000000
--- a/lists/.idea/libraries/Dart_SDK.xml
+++ /dev/null
@@ -1,26 +0,0 @@
-<component name="libraryTable">
- <library name="Dart SDK">
- <CLASSES>
- <root url="file://E:/Tools/dart124/dart-sdk/lib/async" />
- <root url="file://E:/Tools/dart124/dart-sdk/lib/collection" />
- <root url="file://E:/Tools/dart124/dart-sdk/lib/convert" />
- <root url="file://E:/Tools/dart124/dart-sdk/lib/core" />
- <root url="file://E:/Tools/dart124/dart-sdk/lib/developer" />
- <root url="file://E:/Tools/dart124/dart-sdk/lib/html" />
- <root url="file://E:/Tools/dart124/dart-sdk/lib/indexed_db" />
- <root url="file://E:/Tools/dart124/dart-sdk/lib/io" />
- <root url="file://E:/Tools/dart124/dart-sdk/lib/isolate" />
- <root url="file://E:/Tools/dart124/dart-sdk/lib/js" />
- <root url="file://E:/Tools/dart124/dart-sdk/lib/js_util" />
- <root url="file://E:/Tools/dart124/dart-sdk/lib/math" />
- <root url="file://E:/Tools/dart124/dart-sdk/lib/mirrors" />
- <root url="file://E:/Tools/dart124/dart-sdk/lib/svg" />
- <root url="file://E:/Tools/dart124/dart-sdk/lib/typed_data" />
- <root url="file://E:/Tools/dart124/dart-sdk/lib/web_audio" />
- <root url="file://E:/Tools/dart124/dart-sdk/lib/web_gl" />
- <root url="file://E:/Tools/dart124/dart-sdk/lib/web_sql" />
- </CLASSES>
- <JAVADOC />
- <SOURCES />
- </library>
-</component>
\ No newline at end of file
diff --git a/lists/.idea/lists.iml b/lists/.idea/lists.iml
deleted file mode 100755
index f298e84..0000000
--- a/lists/.idea/lists.iml
+++ /dev/null
@@ -1,14 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<module type="JAVA_MODULE" version="4">
- <component name="NewModuleRootManager" inherit-compiler-output="true">
- <exclude-output />
- <content url="file://$MODULE_DIR$">
- <excludeFolder url="file://$MODULE_DIR$/.pub" />
- <excludeFolder url="file://$MODULE_DIR$/build" />
- </content>
- <orderEntry type="inheritedJdk" />
- <orderEntry type="sourceFolder" forTests="false" />
- <orderEntry type="library" name="Dart SDK" level="project" />
- <orderEntry type="library" name="Dart Packages" level="project" />
- </component>
-</module>
\ No newline at end of file
diff --git a/lists/.idea/modules.xml b/lists/.idea/modules.xml
deleted file mode 100755
index 965aa4f..0000000
--- a/lists/.idea/modules.xml
+++ /dev/null
@@ -1,8 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project version="4">
- <component name="ProjectModuleManager">
- <modules>
- <module fileurl="file://$PROJECT_DIR$/.idea/lists.iml" filepath="$PROJECT_DIR$/.idea/lists.iml" />
- </modules>
- </component>
-</project>
\ No newline at end of file
diff --git a/lists/.idea/workspace.xml b/lists/.idea/workspace.xml
deleted file mode 100755
index bec3ecf..0000000
--- a/lists/.idea/workspace.xml
+++ /dev/null
@@ -1,418 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project version="4">
- <component name="ChangeListManager">
- <list default="true" id="1e7c422d-c54f-4817-918c-5cbd8cef7c7b" name="Default Changelist" comment="" />
- <option name="EXCLUDED_CONVERTED_TO_IGNORED" value="true" />
- <option name="SHOW_DIALOG" value="false" />
- <option name="HIGHLIGHT_CONFLICTS" value="true" />
- <option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
- <option name="LAST_RESOLUTION" value="IGNORE" />
- </component>
- <component name="FileEditorManager">
- <leaf SIDE_TABS_SIZE_LIMIT_KEY="300">
- <file pinned="false" current-in-tab="false">
- <entry file="file://$PROJECT_DIR$/pubspec.yaml">
- <provider selected="true" editor-type-id="text-editor">
- <state relative-caret-position="17">
- <caret line="1" column="14" selection-start-line="1" selection-start-column="14" selection-end-line="1" selection-end-column="14" />
- </state>
- </provider>
- </entry>
- </file>
- <file pinned="false" current-in-tab="true">
- <entry file="file://$PROJECT_DIR$/CHANGELOG.md">
- <provider selected="true" editor-type-id="text-editor">
- <state>
- <caret column="8" selection-start-column="8" selection-end-column="8" />
- </state>
- </provider>
- </entry>
- </file>
- <file pinned="false" current-in-tab="false">
- <entry file="file://$PROJECT_DIR$/README.md">
- <provider selected="true" editor-type-id="text-editor">
- <state relative-caret-position="85">
- <caret line="5" column="14" selection-start-line="5" selection-start-column="14" selection-end-line="5" selection-end-column="14" />
- </state>
- </provider>
- </entry>
- </file>
- </leaf>
- </component>
- <component name="FileTemplateManagerImpl">
- <option name="RECENT_TEMPLATES">
- <list>
- <option value="Dart File" />
- </list>
- </option>
- </component>
- <component name="FindInProjectRecents">
- <findStrings>
- <find>key</find>
- <find>set</find>
- </findStrings>
- </component>
- <component name="IdeDocumentHistory">
- <option name="CHANGED_PATHS">
- <list>
- <option value="$PROJECT_DIR$/example/delete_me.dart" />
- <option value="$PROJECT_DIR$/test/sparse_list_test.dart" />
- <option value="$PROJECT_DIR$/analysis_options.yaml" />
- <option value="$PROJECT_DIR$/test/wrapped_list_test.dart" />
- <option value="$PROJECT_DIR$/lib/src/grouped_range_list.dart" />
- <option value="$PROJECT_DIR$/lib/src/sparse_bool_list.dart" />
- <option value="$PROJECT_DIR$/example/example.dart" />
- <option value="$PROJECT_DIR$/lib/src/list_pointer.dart" />
- <option value="$PROJECT_DIR$/lib/src/sparse_list.dart" />
- <option value="$PROJECT_DIR$/lib/src/bit_list.dart" />
- <option value="$PROJECT_DIR$/lib/src/range_list.dart" />
- <option value="$PROJECT_DIR$/lib/src/step_list.dart" />
- <option value="$PROJECT_DIR$/lib/src/wrapped_list.dart" />
- <option value="$PROJECT_DIR$/lib/src/filled_list.dart" />
- <option value="$PROJECT_DIR$/pubspec.yaml" />
- <option value="$PROJECT_DIR$/README.md" />
- <option value="$PROJECT_DIR$/CHANGELOG.md" />
- </list>
- </option>
- </component>
- <component name="ProjectFrameBounds">
- <option name="x" value="75" />
- <option name="y" value="34" />
- <option name="width" value="1837" />
- <option name="height" value="934" />
- </component>
- <component name="ProjectView">
- <navigator proportions="" version="1">
- <foldersAlwaysOnTop value="true" />
- </navigator>
- <panes>
- <pane id="PackagesPane" />
- <pane id="ProjectPane">
- <subPane>
- <expand>
- <path>
- <item name="lists" type="b2602c69:ProjectViewProjectNode" />
- <item name="lists" type="462c0819:PsiDirectoryNode" />
- </path>
- <path>
- <item name="lists" type="b2602c69:ProjectViewProjectNode" />
- <item name="lists" type="462c0819:PsiDirectoryNode" />
- <item name="example" type="462c0819:PsiDirectoryNode" />
- </path>
- <path>
- <item name="lists" type="b2602c69:ProjectViewProjectNode" />
- <item name="lists" type="462c0819:PsiDirectoryNode" />
- <item name="lib" type="462c0819:PsiDirectoryNode" />
- </path>
- <path>
- <item name="lists" type="b2602c69:ProjectViewProjectNode" />
- <item name="lists" type="462c0819:PsiDirectoryNode" />
- <item name="lib" type="462c0819:PsiDirectoryNode" />
- <item name="src" type="462c0819:PsiDirectoryNode" />
- </path>
- <path>
- <item name="lists" type="b2602c69:ProjectViewProjectNode" />
- <item name="lists" type="462c0819:PsiDirectoryNode" />
- <item name="test" type="462c0819:PsiDirectoryNode" />
- </path>
- </expand>
- <select />
- </subPane>
- </pane>
- <pane id="Scope" />
- </panes>
- </component>
- <component name="PropertiesComponent">
- <property name="dart.analysis.tool.window.force.activate" value="false" />
- <property name="last_opened_file_path" value="$PROJECT_DIR$" />
- </component>
- <component name="RunDashboard">
- <option name="ruleStates">
- <list>
- <RuleState>
- <option name="name" value="ConfigurationTypeDashboardGroupingRule" />
- </RuleState>
- <RuleState>
- <option name="name" value="StatusDashboardGroupingRule" />
- </RuleState>
- </list>
- </option>
- </component>
- <component name="RunManager" selected="Dart Test.tests in sparse_list_test.dart">
- <configuration name="tests in list_pointer_test.dart" type="DartTestRunConfigurationType" factoryName="Dart Test" temporary="true" nameIsGenerated="true">
- <option name="filePath" value="$PROJECT_DIR$/test/list_pointer_test.dart" />
- <option name="testName" value="list_pointer_test.dart" />
- <method v="2" />
- </configuration>
- <configuration name="tests in range_list_test.dart" type="DartTestRunConfigurationType" factoryName="Dart Test" temporary="true" nameIsGenerated="true">
- <option name="filePath" value="$PROJECT_DIR$/test/range_list_test.dart" />
- <option name="testName" value="range_list_test.dart" />
- <method v="2" />
- </configuration>
- <configuration name="tests in sparse_list_test.dart" type="DartTestRunConfigurationType" factoryName="Dart Test" temporary="true" nameIsGenerated="true">
- <option name="filePath" value="$PROJECT_DIR$/test/sparse_list_test.dart" />
- <option name="testName" value="sparse_list_test.dart" />
- <method v="2" />
- </configuration>
- <configuration name="tests in step_list_test.dart" type="DartTestRunConfigurationType" factoryName="Dart Test" temporary="true" nameIsGenerated="true">
- <option name="filePath" value="$PROJECT_DIR$/test/step_list_test.dart" />
- <option name="testName" value="step_list_test.dart" />
- <method v="2" />
- </configuration>
- <configuration name="tests in wrapped_list_test.dart" type="DartTestRunConfigurationType" factoryName="Dart Test" temporary="true" nameIsGenerated="true">
- <option name="filePath" value="$PROJECT_DIR$/test/wrapped_list_test.dart" />
- <option name="testName" value="wrapped_list_test.dart" />
- <method v="2" />
- </configuration>
- <recent_temporary>
- <list>
- <item itemvalue="Dart Test.tests in sparse_list_test.dart" />
- <item itemvalue="Dart Test.tests in wrapped_list_test.dart" />
- <item itemvalue="Dart Test.tests in step_list_test.dart" />
- <item itemvalue="Dart Test.tests in range_list_test.dart" />
- <item itemvalue="Dart Test.tests in list_pointer_test.dart" />
- </list>
- </recent_temporary>
- </component>
- <component name="TestHistory">
- <history-entry file="tests_in_sparse_list_test_dart - 2019.03.26 at 23h 47m 47s.xml">
- <configuration name="tests in sparse_list_test.dart" configurationId="DartTestRunConfigurationType" />
- </history-entry>
- <history-entry file="tests_in_bit_list_test_dart - 2019.03.27 at 00h 17m 55s.xml">
- <configuration name="tests in bit_list_test.dart" configurationId="DartTestRunConfigurationType" />
- </history-entry>
- <history-entry file="tests_in_filled_list_test_dart - 2019.03.27 at 00h 18m 04s.xml">
- <configuration name="tests in filled_list_test.dart" configurationId="DartTestRunConfigurationType" />
- </history-entry>
- <history-entry file="tests_in_list_pointer_test_dart - 2019.03.27 at 00h 18m 10s.xml">
- <configuration name="tests in list_pointer_test.dart" configurationId="DartTestRunConfigurationType" />
- </history-entry>
- <history-entry file="tests_in_range_list_test_dart - 2019.03.27 at 00h 18m 16s.xml">
- <configuration name="tests in range_list_test.dart" configurationId="DartTestRunConfigurationType" />
- </history-entry>
- <history-entry file="tests_in_sparse_list_test_dart - 2019.03.27 at 00h 18m 23s.xml">
- <configuration name="tests in sparse_list_test.dart" configurationId="DartTestRunConfigurationType" />
- </history-entry>
- <history-entry file="tests_in_step_list_test_dart - 2019.03.27 at 00h 18m 28s.xml">
- <configuration name="tests in step_list_test.dart" configurationId="DartTestRunConfigurationType" />
- </history-entry>
- <history-entry file="tests_in_wrapped_list_test_dart - 2019.03.27 at 00h 18m 33s.xml">
- <configuration name="tests in wrapped_list_test.dart" configurationId="DartTestRunConfigurationType" />
- </history-entry>
- <history-entry file="tests_in_sparse_list_test_dart - 2019.03.27 at 20h 34m 31s.xml">
- <configuration name="tests in sparse_list_test.dart" configurationId="DartTestRunConfigurationType" />
- </history-entry>
- <history-entry file="tests_in_sparse_list_test_dart - 2019.03.27 at 20h 36m 04s.xml">
- <configuration name="tests in sparse_list_test.dart" configurationId="DartTestRunConfigurationType" />
- </history-entry>
- </component>
- <component name="ToolWindowManager">
- <frame x="75" y="34" width="1837" height="934" extended-state="0" />
- <editor active="true" />
- <layout>
- <window_info active="true" content_ui="combo" id="Project" order="0" visible="true" weight="0.2495831" />
- <window_info id="Structure" order="1" side_tool="true" weight="0.25" />
- <window_info id="Designer" order="2" />
- <window_info id="Favorites" order="3" side_tool="true" />
- <window_info anchor="bottom" id="Message" order="0" />
- <window_info anchor="bottom" id="Find" order="1" />
- <window_info anchor="bottom" id="Run" order="2" weight="0.32917705" />
- <window_info anchor="bottom" id="Debug" order="3" weight="0.3990025" />
- <window_info anchor="bottom" id="Cvs" order="4" weight="0.25" />
- <window_info anchor="bottom" id="Inspection" order="5" weight="0.4" />
- <window_info anchor="bottom" id="TODO" order="6" />
- <window_info anchor="bottom" id="Version Control" order="7" />
- <window_info anchor="bottom" id="Event Log" order="8" side_tool="true" />
- <window_info anchor="bottom" id="Dart Analysis" order="9" weight="0.32917705" />
- <window_info anchor="bottom" id="Messages" order="10" weight="0.32917705" />
- <window_info anchor="right" id="Commander" internal_type="SLIDING" order="0" type="SLIDING" weight="0.4" />
- <window_info anchor="right" id="Ant Build" order="1" weight="0.25" />
- <window_info anchor="right" content_ui="combo" id="Hierarchy" order="2" weight="0.25" />
- <window_info anchor="right" id="Palette	" order="3" />
- </layout>
- </component>
- <component name="editorHistoryManager">
- <entry file="file://E:/Tools/dart124/dart-sdk/lib/core/errors.dart">
- <provider selected="true" editor-type-id="text-editor">
- <state relative-caret-position="151">
- <caret line="318" column="8" selection-start-line="318" selection-start-column="8" selection-end-line="318" selection-end-column="8" />
- </state>
- </provider>
- </entry>
- <entry file="file://$PROJECT_DIR$/lib/lists.dart">
- <provider selected="true" editor-type-id="text-editor" />
- </entry>
- <entry file="file://$PROJECT_DIR$/example/delete_me.dart" />
- <entry file="file://$PROJECT_DIR$/test/wrapped_list_test.dart">
- <provider selected="true" editor-type-id="text-editor">
- <state relative-caret-position="374">
- <caret line="23" column="18" lean-forward="true" selection-start-line="23" selection-start-column="18" selection-end-line="23" selection-end-column="18" />
- </state>
- </provider>
- </entry>
- <entry file="file://$PROJECT_DIR$/analysis_options.yaml">
- <provider selected="true" editor-type-id="text-editor">
- <state relative-caret-position="51">
- <caret line="3" column="25" selection-start-line="3" selection-start-column="25" selection-end-line="3" selection-end-column="25" />
- </state>
- </provider>
- </entry>
- <entry file="file://$PROJECT_DIR$/lib/src/grouped_range_list.dart">
- <provider selected="true" editor-type-id="text-editor">
- <state relative-caret-position="323">
- <caret line="59" column="10" lean-forward="true" selection-start-line="59" selection-start-column="10" selection-end-line="59" selection-end-column="10" />
- </state>
- </provider>
- </entry>
- <entry file="file://E:/Tools/dart124/dart-sdk/lib/collection/linked_hash_set.dart">
- <provider selected="true" editor-type-id="text-editor">
- <state relative-caret-position="187">
- <caret line="77" column="30" lean-forward="true" selection-start-line="77" selection-start-column="7" selection-end-line="77" selection-end-column="30" />
- </state>
- </provider>
- </entry>
- <entry file="file://E:/Tools/dart124/dart-sdk/lib/core/set.dart">
- <provider selected="true" editor-type-id="text-editor">
- <state relative-caret-position="170">
- <caret line="44" column="26" selection-start-line="44" selection-start-column="26" selection-end-line="44" selection-end-column="26" />
- </state>
- </provider>
- </entry>
- <entry file="file://$PROJECT_DIR$/test/sparse_list_test.dart">
- <provider selected="true" editor-type-id="text-editor">
- <state relative-caret-position="119">
- <caret line="316" column="20" selection-start-line="316" selection-start-column="20" selection-end-line="316" selection-end-column="20" />
- <folding>
- <element signature="e#0#34#0" expanded="true" />
- </folding>
- </state>
- </provider>
- </entry>
- <entry file="file://$PROJECT_DIR$/example/example.dart">
- <provider selected="true" editor-type-id="text-editor">
- <state relative-caret-position="187">
- <caret line="95" column="20" lean-forward="true" selection-start-line="95" selection-start-column="20" selection-end-line="95" selection-end-column="20" />
- </state>
- </provider>
- </entry>
- <entry file="file://$PROJECT_DIR$/test/list_pointer_test.dart">
- <provider selected="true" editor-type-id="text-editor">
- <state>
- <folding>
- <element signature="e#0#34#0" expanded="true" />
- </folding>
- </state>
- </provider>
- </entry>
- <entry file="file://$PROJECT_DIR$/lib/src/list_pointer.dart">
- <provider selected="true" editor-type-id="text-editor">
- <state relative-caret-position="153">
- <caret line="51" column="54" lean-forward="true" selection-start-line="51" selection-start-column="54" selection-end-line="51" selection-end-column="54" />
- </state>
- </provider>
- </entry>
- <entry file="file://$PROJECT_DIR$/lib/src/sparse_list.dart">
- <provider selected="true" editor-type-id="text-editor">
- <state relative-caret-position="492">
- <caret line="329" column="26" lean-forward="true" selection-start-line="329" selection-start-column="26" selection-end-line="329" selection-end-column="26" />
- </state>
- </provider>
- </entry>
- <entry file="file://$PROJECT_DIR$/lib/src/bit_list.dart">
- <provider selected="true" editor-type-id="text-editor">
- <state relative-caret-position="170">
- <caret line="25" column="26" lean-forward="true" selection-start-line="25" selection-start-column="26" selection-end-line="25" selection-end-column="26" />
- </state>
- </provider>
- </entry>
- <entry file="file://$PROJECT_DIR$/test/filled_list_test.dart">
- <provider selected="true" editor-type-id="text-editor">
- <state>
- <folding>
- <element signature="e#0#34#0" expanded="true" />
- </folding>
- </state>
- </provider>
- </entry>
- <entry file="file://$PROJECT_DIR$/test/range_list_test.dart">
- <provider selected="true" editor-type-id="text-editor">
- <state>
- <folding>
- <element signature="e#0#34#0" expanded="true" />
- </folding>
- </state>
- </provider>
- </entry>
- <entry file="file://$PROJECT_DIR$/lib/src/range_list.dart">
- <provider selected="true" editor-type-id="text-editor">
- <state relative-caret-position="240">
- <caret line="30" column="5" selection-start-line="30" selection-start-column="2" selection-end-line="30" selection-end-column="5" />
- </state>
- </provider>
- </entry>
- <entry file="file://$PROJECT_DIR$/lib/src/sparse_bool_list.dart">
- <provider selected="true" editor-type-id="text-editor">
- <state relative-caret-position="340">
- <caret line="20" column="12" selection-start-line="20" selection-start-column="12" selection-end-line="20" selection-end-column="12" />
- </state>
- </provider>
- </entry>
- <entry file="file://$PROJECT_DIR$/lib/src/step_list.dart">
- <provider selected="true" editor-type-id="text-editor">
- <state relative-caret-position="645">
- <caret line="100" lean-forward="true" selection-start-line="100" selection-end-line="100" />
- </state>
- </provider>
- </entry>
- <entry file="file://$PROJECT_DIR$/lib/src/wrapped_list.dart">
- <provider selected="true" editor-type-id="text-editor">
- <state relative-caret-position="289">
- <caret line="17" column="26" lean-forward="true" selection-start-line="17" selection-start-column="26" selection-end-line="17" selection-end-column="26" />
- </state>
- </provider>
- </entry>
- <entry file="file://$PROJECT_DIR$/lib/src/filled_list.dart">
- <provider selected="true" editor-type-id="text-editor">
- <state relative-caret-position="332">
- <caret line="20" column="2" selection-start-line="20" selection-start-column="2" selection-end-line="20" selection-end-column="2" />
- </state>
- </provider>
- </entry>
- <entry file="file://$PROJECT_DIR$/README.md">
- <provider selected="true" editor-type-id="text-editor">
- <state relative-caret-position="85">
- <caret line="5" column="14" selection-start-line="5" selection-start-column="14" selection-end-line="5" selection-end-column="14" />
- </state>
- </provider>
- </entry>
- <entry file="file://$PROJECT_DIR$/pubspec.yaml">
- <provider selected="true" editor-type-id="text-editor">
- <state relative-caret-position="17">
- <caret line="1" column="14" selection-start-line="1" selection-start-column="14" selection-end-line="1" selection-end-column="14" />
- </state>
- </provider>
- </entry>
- <entry file="file://$PROJECT_DIR$/CHANGELOG.md">
- <provider selected="true" editor-type-id="text-editor">
- <state>
- <caret column="8" selection-start-column="8" selection-end-column="8" />
- </state>
- </provider>
- </entry>
- </component>
- <component name="masterDetails">
- <states>
- <state key="ProjectJDKs.UI">
- <settings>
- <splitter-proportions>
- <option name="proportions">
- <list>
- <option value="0.2" />
- </list>
- </option>
- </splitter-proportions>
- </settings>
- </state>
- </states>
- </component>
-</project>
\ No newline at end of file
diff --git a/lists/BUILD.gn b/lists/BUILD.gn
index dfd1075..ea498bc 100644
--- a/lists/BUILD.gn
+++ b/lists/BUILD.gn
@@ -1,4 +1,4 @@
-# This file is generated by importer.py for lists-0.1.3
+# This file is generated by importer.py for lists-0.1.4
import("//build/dart/dart_library.gni")
diff --git a/lists/CHANGELOG.md b/lists/CHANGELOG.md
index 6a54d94..f5c6393 100755
--- a/lists/CHANGELOG.md
+++ b/lists/CHANGELOG.md
@@ -1,3 +1,7 @@
+## 0.1.4
+
+- Source code changed to be more pedantic
+
## 0.1.3
- Minor changes
diff --git a/lists/README.md b/lists/README.md
index 9fe9bb0..e9c4a05 100755
--- a/lists/README.md
+++ b/lists/README.md
@@ -3,7 +3,7 @@
Collection of the lists (BitList, FilledList, GroupedRangeList, ListPointer, RangeList, SparseBoolList, SparseList, StepList, WrappedList).
-Version: 0.1.3
+Version: 0.1.4
```dart
import "package:lists/lists.dart";
diff --git a/lists/analysis_options.yaml b/lists/analysis_options.yaml
index c230cee..c1aa82f 100755
--- a/lists/analysis_options.yaml
+++ b/lists/analysis_options.yaml
@@ -1,4 +1,34 @@
include: package:pedantic/analysis_options.yaml
analyzer:
strong-mode:
- implicit-casts: false
\ No newline at end of file
+ implicit-casts: false
+linter:
+ rules:
+ - avoid_annotating_with_dynamic
+ - avoid_empty_else
+ - avoid_init_to_null
+ - avoid_relative_lib_imports
+ - avoid_return_types_on_setters
+ - avoid_shadowing_type_parameters
+ - avoid_types_as_parameter_names
+ - empty_constructor_bodies
+ - no_duplicate_case_values
+ - null_closures
+ - prefer_contains
+ - prefer_equal_for_default_values
+ - prefer_final_fields
+ - prefer_final_locals
+ - prefer_is_empty
+ - prefer_is_not_empty
+ - prefer_null_aware_operators
+ - prefer_relative_imports
+ - prefer_void_to_null
+ - recursive_getters
+ - slash_for_doc_comments
+ - unawaited_futures
+ - unnecessary_lambdas
+ - unnecessary_overrides
+ - unnecessary_parenthesis
+ - unrelated_type_equality_checks
+ - use_rethrow_when_possible
+ - valid_regexps
\ No newline at end of file
diff --git a/lists/example/example.dart b/lists/example/example.dart
index 92e37c4..5eb1ffa 100755
--- a/lists/example/example.dart
+++ b/lists/example/example.dart
@@ -1,4 +1,4 @@
-import "package:lists/lists.dart";
+import 'package:lists/lists.dart';
void main() {
bitList();
@@ -14,56 +14,56 @@
// The bit state list with 65536 elements
// Real size of the list (in memory) 30 times less
// Exact size 2185 elements of 'Smi' values
- var list = new BitList(65536);
+ var list = BitList(65536);
list.set(32767);
print(list.get(32767));
// The list with 65536 elements set to true
- list = new BitList(65536, true);
+ list = BitList(65536, true);
print(list.get(32767));
// The list with 1073741824 elements
- list = new BitList(1073741824);
+ list = BitList(1073741824);
}
void filledList() {
// The read only list with 40 values of "="
- var list = new FilledList<String>(40, "=");
- print("${list.join()}");
+ var list = FilledList<String>(40, '=');
+ print('${list.join()}');
// The list with 10000000000000 values of "hello"
- list = new FilledList<String>(10000000000000, "hello");
+ list = FilledList<String>(10000000000000, 'hello');
}
void rangeList() {
// The values from 0 to 10
- var list = new RangeList(0, 10);
+ var list = RangeList(0, 10);
print("${list.join(", ")}");
// The same values in reversed order
- var reversed = list.reversed;
+ final reversed = list.reversed;
print("${reversed.join(", ")}");
// The same list with step 2
- var list2 = list.toStepList(2);
+ final list2 = list.toStepList(2);
print("${list2.join(", ")}");
// The values from -10000000000000 to 10000000000000
- list = new RangeList(10000000000000, 10000000000000);
+ list = RangeList(10000000000000, 10000000000000);
}
void sparseBoolList() {
// Really big size
- var length = 2 * 1024 * 1024 * 1024;
- var list = new SparseBoolList(length: length);
+ final length = 2 * 1024 * 1024 * 1024;
+ final list = SparseBoolList(length: length);
var groupCount = 0;
var offset = 0;
- print("SparseBoolList: ${_format(length)} length.");
- var sw = new Stopwatch();
+ print('SparseBoolList: ${_format(length)} length.');
+ final sw = Stopwatch();
sw.start();
while (true) {
- var size = 128 * 1024;
- list.setGroup(new GroupedRangeList(offset, offset + size, true));
+ final size = 128 * 1024;
+ list.setGroup(GroupedRangeList(offset, offset + size, true));
offset += size + 128 * 1024;
groupCount++;
if (offset >= length) {
@@ -72,108 +72,108 @@
}
//
sw.stop();
- var elapsed = (sw.elapsedMilliseconds / 1000);
- print("SparseBoolList: ${_format(groupCount)} groups added in $elapsed sec.");
+ var elapsed = sw.elapsedMilliseconds / 1000;
+ print('SparseBoolList: ${_format(groupCount)} groups added in $elapsed sec.');
//
- var accessed = 0;
+ var accessed = 0;
//
sw.reset();
sw.start();
for (var i = 0; i < length; i += 100) {
- var x = list[i];
+ final x = list[i];
accessed++;
}
sw.stop();
- elapsed = (sw.elapsedMilliseconds / 1000);
+ elapsed = sw.elapsedMilliseconds / 1000;
print(
- "SparseBoolList: ${_format(accessed)} elements accessed in $elapsed sec.");
+ 'SparseBoolList: ${_format(accessed)} elements accessed in $elapsed sec.');
}
void sparseList() {
// Count is 50000 elements
- var count = 50000;
- var list = new SparseList();
+ final count = 50000;
+ final list = SparseList();
var offset = 0;
- var sw = new Stopwatch();
+ final sw = Stopwatch();
sw.start();
for (var i = 0; i < count; i++) {
offset += 100;
- var size = 100;
+ final size = 100;
//list.addGroup(_grp(offset, offset + size, i));
- list.addGroup(new GroupedRangeList(offset, offset + size, i));
+ list.addGroup(GroupedRangeList(offset, offset + size, i));
offset += size;
}
sw.stop();
- var elapsed = (sw.elapsedMilliseconds / 1000);
- print("SparseList: ${_format(count)} groups added in $elapsed sec.");
+ var elapsed = sw.elapsedMilliseconds / 1000;
+ print('SparseList: ${_format(count)} groups added in $elapsed sec.');
// Access all elements
sw.reset();
sw.start();
- var length = list.length;
+ final length = list.length;
for (var i = 0; i < length; i++) {
- var x = list[i];
+ final x = list[i];
}
sw.stop();
- elapsed = (sw.elapsedMilliseconds / 1000);
- print("SparseList: ${_format(length)} elements accessed in $elapsed sec.");
+ elapsed = sw.elapsedMilliseconds / 1000;
+ print('SparseList: ${_format(length)} elements accessed in $elapsed sec.');
}
void stepList() {
// The values from 0 to 10
- var list = new StepList(0, 10);
+ var list = StepList(0, 10);
print("${list.join(", ")}");
// The values from 10 to 0
- list = new StepList(10, 0);
+ list = StepList(10, 0);
print("${list.join(", ")}");
// The values from 0 to 10 with step 2
- list = new StepList(0, 10, 2);
+ list = StepList(0, 10, 2);
print("${list.join(", ")}");
// The values from 10 to 0 with step -2
- list = new StepList(10, 0, -2);
+ list = StepList(10, 0, -2);
print("${list.join(", ")}");
// The values from 0 to 255 with step 64
const MIN_BYTE = 0;
const MAX_BYTE = 255;
- list = new StepList(MIN_BYTE, MAX_BYTE, (MAX_BYTE >> 2) + 1);
+ list = StepList(MIN_BYTE, MAX_BYTE, (MAX_BYTE >> 2) + 1);
print("${list.join(", ")}");
// The values from -10000000000000 to 10000000000000 with step 1
- list = new StepList(-10000000000000, 10000000000000);
+ list = StepList(-10000000000000, 10000000000000);
}
void wrappedList() {
// The read only wrapper for list
- var source = [0, 1, 2, 3];
- var list = new WrappedList<int>(source);
+ final source = [0, 1, 2, 3];
+ final list = WrappedList<int>(source);
try {
list[0] = 0;
} catch (e) {
- print("$e");
+ print('$e');
}
try {
list.length = 0;
} catch (e) {
- print("$e");
+ print('$e');
}
}
String _format(int number) {
- var string = number.toString();
- var length = string.length;
- var list = <String>[];
+ final string = number.toString();
+ final length = string.length;
+ final list = <String>[];
var count = 0;
for (var i = length - 1; i >= 0; i--) {
list.add(string[i]);
if (count++ == 2) {
- list.add(" ");
+ list.add(' ');
count = 0;
}
}
diff --git a/lists/lib/lists.dart b/lists/lib/lists.dart
index e3de3a8..6668568 100755
--- a/lists/lib/lists.dart
+++ b/lists/lib/lists.dart
@@ -1,13 +1,13 @@
library lists;
-import "dart:collection";
+import 'dart:collection';
-part "src/bit_list.dart";
-part "src/filled_list.dart";
-part "src/grouped_range_list.dart";
-part "src/list_pointer.dart";
-part "src/range_list.dart";
-part "src/sparse_bool_list.dart";
-part "src/sparse_list.dart";
-part "src/step_list.dart";
-part "src/wrapped_list.dart";
+part 'src/bit_list.dart';
+part 'src/filled_list.dart';
+part 'src/grouped_range_list.dart';
+part 'src/list_pointer.dart';
+part 'src/range_list.dart';
+part 'src/sparse_bool_list.dart';
+part 'src/sparse_list.dart';
+part 'src/step_list.dart';
+part 'src/wrapped_list.dart';
diff --git a/lists/lib/src/bit_list.dart b/lists/lib/src/bit_list.dart
index 28bf2c0..bf37a3c 100755
--- a/lists/lib/src/bit_list.dart
+++ b/lists/lib/src/bit_list.dart
@@ -7,57 +7,61 @@
BitList(int length, [bool fill]) {
if (length == null || length < 0) {
- throw new ArgumentError("length: $length");
+ throw ArgumentError('length: $length');
}
_length = length;
- var slots = (length - 1) ~/ 30 + 1;
+ final slots = (length - 1) ~/ 30 + 1;
if (fill == true) {
- _list = new List<int>.filled(slots, 0x3fffffff);
+ _list = List<int>.filled(slots, 0x3fffffff);
} else {
- _list = new List<int>.filled(slots, 0);
+ _list = List<int>.filled(slots, 0);
}
}
/// Returns the length of list.
+ @override
int get length => _length;
/// Sets the length of list.
+ @override
set length(int length) {
- throw new UnsupportedError("length=");
+ throw UnsupportedError('length=');
}
+ @override
bool operator [](int index) {
if (index == null) {
- throw new ArgumentError("index: $index");
+ throw ArgumentError('index: $index');
}
if (index < 0 || index >= _length) {
- throw new RangeError(index);
+ throw RangeError(index);
}
- var slot = index ~/ 30;
- var position = slot * 30;
- var mask = 1 << (index - position);
+ final slot = index ~/ 30;
+ final position = slot * 30;
+ final mask = 1 << (index - position);
return (_list[slot] & mask) != 0;
}
+ @override
void operator []=(int index, bool value) {
if (index == null) {
- throw new ArgumentError("index: $index");
+ throw ArgumentError('index: $index');
}
if (index < 0 || index >= _length) {
- throw new RangeError(index);
+ throw RangeError(index);
}
if (value == null) {
- throw new ArgumentError("value: $value");
+ throw ArgumentError('value: $value');
}
- var slot = index ~/ 30;
- var position = slot * 30;
- var mask = 1 << (index - position);
+ final slot = index ~/ 30;
+ final position = slot * 30;
+ final mask = 1 << (index - position);
if (value) {
_list[slot] |= mask;
} else {
diff --git a/lists/lib/src/filled_list.dart b/lists/lib/src/filled_list.dart
index d393bdf..b320db6 100755
--- a/lists/lib/src/filled_list.dart
+++ b/lists/lib/src/filled_list.dart
@@ -7,7 +7,7 @@
FilledList(int length, E fill) {
if (length == null || length < 0) {
- throw new ArgumentError("length: $length");
+ throw ArgumentError('length: $length');
}
_fill = fill;
@@ -15,26 +15,30 @@
}
/// Returns the length of list.
+ @override
int get length => _length;
/// Sets the length of list.
+ @override
set length(int length) {
- throw new UnsupportedError("length=");
+ throw UnsupportedError('length=');
}
+ @override
E operator [](int index) {
if (index == null) {
- throw new ArgumentError("index: $index");
+ throw ArgumentError('index: $index');
}
if (index < 0 || index >= _length) {
- throw new RangeError(index);
+ throw RangeError(index);
}
return _fill;
}
+ @override
void operator []=(int index, E value) {
- throw new UnsupportedError("operator []=");
+ throw UnsupportedError('operator []=');
}
}
diff --git a/lists/lib/src/grouped_range_list.dart b/lists/lib/src/grouped_range_list.dart
index ff43b70..ee6b2ba 100755
--- a/lists/lib/src/grouped_range_list.dart
+++ b/lists/lib/src/grouped_range_list.dart
@@ -8,9 +8,10 @@
/// Returns the intersection of this grouped range list and the [other] grouped
/// range list; otherwise null.
+ @override
GroupedRangeList<TKey> intersection(RangeList other) {
if (other == null) {
- throw new ArgumentError("other: $other");
+ throw ArgumentError('other: $other');
}
if (!intersect(other)) {
@@ -18,7 +19,7 @@
}
if (this == other) {
- return new GroupedRangeList<TKey>(this.start, this.end, key);
+ return GroupedRangeList<TKey>(this.start, this.end, key);
}
var start = this.start;
@@ -31,34 +32,36 @@
end = other.end;
}
- return new GroupedRangeList<TKey>(start, end, key);
+ return GroupedRangeList<TKey>(start, end, key);
}
/// Subtracts from this grouped range list the [other] grouped range list and
/// returns the the resulting grouped ranges.
+ @override
List<GroupedRangeList<TKey>> subtract(RangeList other) {
if (other == null) {
- throw new ArgumentError("other: $other");
+ throw ArgumentError('other: $other');
}
- var result = <GroupedRangeList<TKey>>[];
+ final result = <GroupedRangeList<TKey>>[];
if (!intersect(other)) {
return result;
}
if (start < other.start) {
- result.add(new GroupedRangeList<TKey>(start, other.start - 1, key));
+ result.add(GroupedRangeList<TKey>(start, other.start - 1, key));
}
if (other.end < end) {
- result.add(new GroupedRangeList<TKey>(other.end + 1, end, key));
+ result.add(GroupedRangeList<TKey>(other.end + 1, end, key));
}
return result;
}
/// Returns the string representation of grouped range list.
+ @override
String toString() {
- return "[$start..$end]($key)";
+ return '[$start..$end]($key)';
}
}
diff --git a/lists/lib/src/list_pointer.dart b/lists/lib/src/list_pointer.dart
index 4e2baa3..6b43291 100755
--- a/lists/lib/src/list_pointer.dart
+++ b/lists/lib/src/list_pointer.dart
@@ -19,20 +19,22 @@
/// Offset in the base list.
ListPointer(this.base, [int offset = 0]) {
if (base == null) {
- throw new ArgumentError.notNull("base");
+ throw ArgumentError.notNull('base');
}
if (offset == null) {
- throw new ArgumentError.notNull("offset");
+ throw ArgumentError.notNull('offset');
}
_offset = offset;
}
+ @override
int get length => base.length - _offset;
+ @override
set length(int length) {
- throw new UnsupportedError("set length");
+ throw UnsupportedError('set length');
}
/// Gets the offset.
@@ -41,26 +43,28 @@
/// Sets the offset.
set offset(int offset) {
if (offset == null) {
- throw new ArgumentError.notNull("offset");
+ throw ArgumentError.notNull('offset');
}
_offset = offset;
}
- ListPointer<T> operator +(dynamic other) {
+ @override
+ ListPointer<T> operator +(other) {
if (other is int) {
- return new ListPointer<T>(base, offset + other);
+ final i = other as int;
+ return ListPointer<T>(base, offset + i);
}
- throw new ArgumentError.value(other, "other");
+ throw ArgumentError.value(other, 'other');
}
ListPointer<T> operator -(other) {
if (other is int) {
- return new ListPointer<T>(base, offset - other);
+ return ListPointer<T>(base, offset - other);
}
- throw new ArgumentError.value(other, "other");
+ throw ArgumentError.value(other, 'other');
}
bool operator <(other) {
@@ -91,6 +95,7 @@
return false;
}
+ @override
bool operator ==(other) {
if (other is ListPointer) {
if (identical(base, other.base)) {
@@ -137,19 +142,21 @@
return false;
}
+ @override
T operator [](int index) {
if (index == null) {
- throw new ArgumentError.notNull("index");
+ throw ArgumentError.notNull('index');
}
return base[_offset + index];
}
+ @override
void operator []=(int index, value) {
base[_offset + index] = value;
}
ListPointer<T> increment(int n) {
- return new ListPointer<T>(base, offset + n);
+ return ListPointer<T>(base, offset + n);
}
}
diff --git a/lists/lib/src/range_list.dart b/lists/lib/src/range_list.dart
index 68bffa4..d68aaeb 100755
--- a/lists/lib/src/range_list.dart
+++ b/lists/lib/src/range_list.dart
@@ -10,37 +10,40 @@
RangeList(this.start, this.end) {
if (start == null) {
- throw new ArgumentError("start: $start");
+ throw ArgumentError('start: $start');
}
if (end == null) {
- throw new ArgumentError("end: $end");
+ throw ArgumentError('end: $end');
}
if (start > end) {
- throw new StateError("Start '$start' greater then end '$end'");
+ throw StateError("Start '$start' greater then end '$end'");
}
_length = end - start + 1;
}
/// Returns the length of list.
+ @override
int get length => _length;
/// Sets the length of list.
+ @override
set length(int length) {
- throw new UnsupportedError("length=");
+ throw UnsupportedError('length=');
}
+ @override
RangeList operator +(List<int> other) {
if (other == null || other is! RangeList) {
- throw new ArgumentError("other: $other");
+ throw ArgumentError('other: $other');
}
int start;
int end;
- var otherRange = other as RangeList;
+ final otherRange = other as RangeList;
if (this.start < otherRange.start) {
start = this.start;
} else {
@@ -53,9 +56,10 @@
end = otherRange.end;
}
- return new RangeList(start, end);
+ return RangeList(start, end);
}
+ @override
bool operator ==(other) {
if (identical(this, other)) {
return true;
@@ -68,23 +72,26 @@
return false;
}
+ @override
int operator [](int index) {
if (index == null) {
- throw new ArgumentError("index: $index");
+ throw ArgumentError('index: $index');
}
if (index < 0 || index >= _length) {
- throw new RangeError(index);
+ throw RangeError(index);
}
return start + index;
}
+ @override
void operator []=(int index, int value) {
- throw new UnsupportedError("operator []=");
+ throw UnsupportedError('operator []=');
}
/// Returns true if range list contains the [value]; otherwise false.
+ @override
bool contains(value) {
if (value == null ||
value is! int ||
@@ -99,7 +106,7 @@
/// Returns true if this range list includes [other]; otherwise false.
bool includes(RangeList other) {
if (other == null) {
- throw new ArgumentError("other: $other");
+ throw ArgumentError('other: $other');
}
return (other.start >= start && other.start <= end) &&
@@ -109,7 +116,7 @@
/// Returns true if this range list intersect [other]; otherwise false.
bool intersect(RangeList other) {
if (other == null) {
- throw new ArgumentError("other: $other");
+ throw ArgumentError('other: $other');
}
return (start <= other.start && end >= other.start) ||
@@ -120,7 +127,7 @@
/// otherwise null.
RangeList intersection(RangeList other) {
if (other == null) {
- throw new ArgumentError("other: $other");
+ throw ArgumentError('other: $other');
}
if (!intersect(other)) {
@@ -128,7 +135,7 @@
}
if (this == other) {
- return new RangeList(this.start, this.end);
+ return RangeList(this.start, this.end);
}
var start = this.start;
@@ -141,37 +148,38 @@
end = other.end;
}
- return new RangeList(start, end);
+ return RangeList(start, end);
}
/// Subtracts from this range the [other] range and returns the the resulting
/// ranges.
List<RangeList> subtract(RangeList other) {
if (other == null) {
- throw new ArgumentError("other: $other");
+ throw ArgumentError('other: $other');
}
- var result = <RangeList>[];
+ final result = <RangeList>[];
if (!intersect(other)) {
return result;
}
if (start < other.start) {
- result.add(new RangeList(start, other.start - 1));
+ result.add(RangeList(start, other.start - 1));
}
if (other.end < end) {
- result.add(new RangeList(other.end + 1, end));
+ result.add(RangeList(other.end + 1, end));
}
return result;
}
/// Returns the list of elements with specified step.
- StepList toStepList(int step) => new StepList(start, end, step);
+ StepList toStepList(int step) => StepList(start, end, step);
/// Returns the string representation of range list.
+ @override
String toString() {
- return "[$start..$end]";
+ return '[$start..$end]';
}
}
diff --git a/lists/lib/src/sparse_bool_list.dart b/lists/lib/src/sparse_bool_list.dart
index 6abff20..02a58e7 100755
--- a/lists/lib/src/sparse_bool_list.dart
+++ b/lists/lib/src/sparse_bool_list.dart
@@ -6,26 +6,28 @@
/// Sets the values in accordance with the specified [group] and increases
/// (if required) the length up to (range.end + 1).
+ @override
void addGroup(GroupedRangeList<bool> group) {
if (group == null) {
- throw new ArgumentError("group: $group");
+ throw ArgumentError('group: $group');
}
if (group.key is! bool) {
- throw new ArgumentError("Key '${group.key}' must be of type 'bool'.");
+ throw ArgumentError("Key '${group.key}' must be of type 'bool'.");
}
super.addGroup(group);
}
/// Sets the values in accordance with the specified [group].
+ @override
void setGroup(GroupedRangeList<bool> group) {
if (group == null) {
- throw new ArgumentError("group: $group");
+ throw ArgumentError('group: $group');
}
if (group.key is! bool) {
- throw new ArgumentError("Key '${group.key}' must be of type 'bool'.");
+ throw ArgumentError("Key '${group.key}' must be of type 'bool'.");
}
super.setGroup(group);
diff --git a/lists/lib/src/sparse_list.dart b/lists/lib/src/sparse_list.dart
index e5da68d..f3c0ea5 100755
--- a/lists/lib/src/sparse_list.dart
+++ b/lists/lib/src/sparse_list.dart
@@ -12,16 +12,17 @@
bool _frozen = false;
- List<GroupedRangeList<E>> _groups = <GroupedRangeList<E>>[];
+ final List<GroupedRangeList<E>> _groups = <GroupedRangeList<E>>[];
int _length;
- SparseList({this.defaultValue, bool equals(E e1, E e2), int length}) {
+ SparseList(
+ {this.defaultValue, bool Function(E e1, E e2) equals, int length}) {
if (length == null) {
length = 0;
} else {
if (length < 0) {
- throw new ArgumentError("length: $length");
+ throw ArgumentError('length: $length');
}
_fixedLength = true;
@@ -37,7 +38,7 @@
/// Returns the 'end' value from the last group (if available); otherwise null.
int get end {
- var length = _groups.length;
+ final length = _groups.length;
if (_groups.isEmpty) {
return null;
}
@@ -55,19 +56,21 @@
/// Returns a read-only list of the groups.
List<GroupedRangeList<E>> get groups =>
- new UnmodifiableListView<GroupedRangeList<E>>(_groups);
+ UnmodifiableListView<GroupedRangeList<E>>(_groups);
/// Returns the length of list.
+ @override
int get length => _length;
/// Sets the length of list.
+ @override
set length(int length) {
if (length == null) {
- throw new ArgumentError("length: $length");
+ throw ArgumentError('length: $length');
}
if (_fixedLength) {
- throw new StateError("Unable to set the length of a fixed list.");
+ throw StateError('Unable to set the length of a fixed list.');
}
if (frozen) {
@@ -75,7 +78,7 @@
}
if (length < 0) {
- throw new RangeError(length);
+ throw RangeError(length);
}
if (_length == length) {
@@ -93,7 +96,7 @@
return;
}
- _resetValues(new RangeList(length, _length - 1));
+ _resetValues(RangeList(length, _length - 1));
_length = length;
}
@@ -107,13 +110,14 @@
return _groups[0].start;
}
+ @override
E operator [](int index) {
if (index == null) {
- throw new ArgumentError("index: $index");
+ throw ArgumentError('index: $index');
}
if (index < 0 || index >= _length) {
- throw new RangeError(index);
+ throw RangeError(index);
}
var right = _groups.length;
@@ -122,7 +126,7 @@
}
if (right == 1) {
- var group = _groups[0];
+ final group = _groups[0];
if (index <= group.end && index >= group.start) {
return group.key;
} else {
@@ -131,12 +135,12 @@
}
var left = 0;
- var key = index;
+ final key = index;
int middle;
- var value = defaultValue;
+ final value = defaultValue;
while (left < right) {
middle = (left + right) >> 1;
- var group = _groups[middle];
+ final group = _groups[middle];
if (group.end < key) {
left = middle + 1;
} else {
@@ -151,9 +155,10 @@
return value;
}
+ @override
void operator []=(int index, E value) {
if (index == null) {
- throw new ArgumentError("index: $index");
+ throw ArgumentError('index: $index');
}
if (frozen) {
@@ -161,13 +166,13 @@
}
if (index < 0 || index >= _length) {
- throw new RangeError(index);
+ throw RangeError(index);
}
if (_equals(value, defaultValue)) {
- _resetValues(new RangeList(index, index));
+ _resetValues(RangeList(index, index));
} else {
- setGroup(new GroupedRangeList(index, index, value));
+ setGroup(GroupedRangeList(index, index, value));
}
}
@@ -175,11 +180,11 @@
/// (if required) the length up to (range.end + 1).
void addGroup(GroupedRangeList<E> group) {
if (group == null) {
- throw new ArgumentError("group: $group");
+ throw ArgumentError('group: $group');
}
if (_fixedLength) {
- throw new StateError("Unable to add the group into fixed list.");
+ throw StateError('Unable to add the group into fixed list.');
}
if (frozen) {
@@ -187,7 +192,7 @@
}
if (group.start < 0) {
- throw new RangeError(group.start);
+ throw RangeError(group.start);
}
_setGroup(group);
@@ -205,28 +210,28 @@
/// expanded (with default value) or shrunk to specified [range].
List<GroupedRangeList<E>> getAlignedGroups(RangeList range) {
if (range == null) {
- throw new ArgumentError("range: $range");
+ throw ArgumentError('range: $range');
}
- var groups = getGroups(range).toList();
- var length = groups.length;
+ final groups = getGroups(range).toList();
+ final length = groups.length;
if (length == 0) {
- return [new GroupedRangeList<E>(range.start, range.end, defaultValue)];
+ return [GroupedRangeList<E>(range.start, range.end, defaultValue)];
}
- var first = groups.first;
+ final first = groups.first;
if (range.start > first.start) {
groups[0] = first.intersection(range);
} else if (range.start < first.start) {
- var insertion =
- new GroupedRangeList<E>(range.start, first.start - 1, defaultValue);
+ final insertion =
+ GroupedRangeList<E>(range.start, first.start - 1, defaultValue);
groups.insert(0, insertion);
}
- var last = groups.last;
+ final last = groups.last;
if (range.end > last.end) {
- var addition =
- new GroupedRangeList<E>(last.end + 1, range.end, defaultValue);
+ final addition =
+ GroupedRangeList<E>(last.end + 1, range.end, defaultValue);
groups.add(addition);
} else if (range.end < last.end) {
groups[groups.length - 1] = last.intersection(range);
@@ -240,19 +245,18 @@
/// which being expanded (with default value) or shrunk to specified [range].
List<GroupedRangeList<E>> getAllSpace(RangeList range) {
if (range == null) {
- throw new ArgumentError("range: $range");
+ throw ArgumentError('range: $range');
}
- var groups = <GroupedRangeList<E>>[];
+ final groups = <GroupedRangeList<E>>[];
GroupedRangeList<E> previous;
- for (var group in getAlignedGroups(range)) {
+ for (final group in getAlignedGroups(range)) {
if (previous != null) {
- var start = previous.end + 1;
- var delta = group.start - start;
+ final start = previous.end + 1;
+ final delta = group.start - start;
if (delta > 0) {
// Adds the synthetic group
- groups.add(
- new GroupedRangeList<E>(start, group.start - 1, defaultValue));
+ groups.add(GroupedRangeList<E>(start, group.start - 1, defaultValue));
}
}
@@ -269,8 +273,8 @@
return _groups.getRange(0, _groups.length);
}
- var length = _groups.length;
- var left = _findNearestIndex(0, length, range.start);
+ final length = _groups.length;
+ final left = _findNearestIndex(0, length, range.start);
var firstIndex = -1;
var lastIndex = -1;
for (var i = left; i < length; i++) {
@@ -296,8 +300,8 @@
/// Returns the indexes of the elements with a value.
Iterable<int> getIndexes() {
Iterable<int> generator() sync* {
- for (var group in groups) {
- var end = group.end;
+ for (final group in groups) {
+ final end = group.end;
for (var i = group.start; i <= end; i++) {
yield i;
}
@@ -311,11 +315,11 @@
/// length down to (range.start).
void removeValues(RangeList range) {
if (range == null) {
- throw new ArgumentError("range: $range");
+ throw ArgumentError('range: $range');
}
if (_fixedLength) {
- throw new StateError("Unable to remove the values from a fixed list.");
+ throw StateError('Unable to remove the values from a fixed list.');
}
if (frozen) {
@@ -323,7 +327,7 @@
}
if (range.start < 0) {
- throw new RangeError(range.start);
+ throw RangeError(range.start);
}
_resetValues(range);
@@ -344,7 +348,7 @@
/// Resets the values in the specified [range] to the default values.
void resetValues(RangeList range) {
if (range == null) {
- throw new ArgumentError("range: $range");
+ throw ArgumentError('range: $range');
}
if (frozen) {
@@ -352,11 +356,11 @@
}
if (range.start < 0 || range.start >= _length) {
- throw new RangeError(range.start);
+ throw RangeError(range.start);
}
if (range.end >= _length) {
- throw new RangeError(range.end);
+ throw RangeError(range.end);
}
_resetValues(range);
@@ -365,7 +369,7 @@
/// Sets the values in accordance with the specified [group].
void setGroup(GroupedRangeList<E> group) {
if (group == null) {
- throw new ArgumentError("group: $group");
+ throw ArgumentError('group: $group');
}
if (frozen) {
@@ -373,11 +377,11 @@
}
if (group.start < 0 || group.start >= _length) {
- throw new RangeError(group.start);
+ throw RangeError(group.start);
}
if (group.end >= _length) {
- throw new RangeError(group.end);
+ throw RangeError(group.end);
}
_setGroup(group);
@@ -387,14 +391,14 @@
/// sets the length to 0.
void trim() {
if (_fixedLength) {
- throw new StateError("Unable to trim a fixed list.");
+ throw StateError('Unable to trim a fixed list.');
}
if (frozen) {
_errorModificationNotAllowed();
}
- var groupCount = _groups.length;
+ final groupCount = _groups.length;
if (groupCount == 0) {
_length = 0;
} else {
@@ -403,7 +407,7 @@
}
void _errorModificationNotAllowed() {
- throw new StateError("Unable to modify the frozen list.");
+ throw StateError('Unable to modify the frozen list.');
}
int _findNearestIndex(int left, int right, int key) {
@@ -429,30 +433,30 @@
}
void _resetValues(RangeList range) {
- var rangeStart = range.start;
- var rangeEnd = range.end;
- var length = _groups.length;
- var left = _findNearestIndex(0, length, range.start);
+ final rangeStart = range.start;
+ final rangeEnd = range.end;
+ final length = _groups.length;
+ final left = _findNearestIndex(0, length, range.start);
var count = 0;
- var newGroups = <GroupedRangeList<E>>[];
+ final newGroups = <GroupedRangeList<E>>[];
for (var i = left; i < length; i++) {
- var current = _groups[i];
- var start = current.start;
+ final current = _groups[i];
+ final start = current.start;
if (start > rangeEnd) {
break;
}
- var intersect = current.intersect(range);
+ final intersect = current.intersect(range);
if (intersect) {
- var end = current.end;
- var key = current.key;
+ final end = current.end;
+ final key = current.key;
if (start < rangeStart) {
- var newGroup = new GroupedRangeList<E>(start, rangeStart - 1, key);
+ final newGroup = GroupedRangeList<E>(start, rangeStart - 1, key);
newGroups.add(newGroup);
}
if (end > rangeEnd) {
- var newGroup = new GroupedRangeList<E>(rangeEnd + 1, end, key);
+ final newGroup = GroupedRangeList<E>(rangeEnd + 1, end, key);
newGroups.add(newGroup);
}
} else {
@@ -467,15 +471,15 @@
}
void _setGroup(GroupedRangeList<E> group) {
- var groupKey = group.key;
- var length = _groups.length;
+ final groupKey = group.key;
+ final length = _groups.length;
if (length == 0) {
_groups.add(group);
return;
}
- var groupStart = group.start;
- var lastEnd = _groups[length - 1].end;
+ final groupStart = group.start;
+ final lastEnd = _groups[length - 1].end;
int left;
if (groupStart == lastEnd + 1) {
left = length - 1;
@@ -486,43 +490,43 @@
left = _findNearestIndex(0, length, group.start);
}
- var groupEnd = group.end;
+ final groupEnd = group.end;
var count = 0;
- var newGroups = <GroupedRangeList<E>>[];
+ final newGroups = <GroupedRangeList<E>>[];
for (var i = left; i < length; i++) {
- var current = _groups[i];
- var start = current.start;
+ final current = _groups[i];
+ final start = current.start;
if (start > groupEnd + 1) {
break;
}
- var end = current.end;
- var key = current.key;
- var intersect = current.intersect(group);
+ final end = current.end;
+ final key = current.key;
+ final intersect = current.intersect(group);
if (intersect) {
if (start < groupStart) {
if (_equals(key, groupKey)) {
- group = new GroupedRangeList<E>(start, groupEnd, groupKey);
+ group = GroupedRangeList<E>(start, groupEnd, groupKey);
} else {
- var newGroup = new GroupedRangeList<E>(start, groupStart - 1, key);
+ final newGroup = GroupedRangeList<E>(start, groupStart - 1, key);
newGroups.add(newGroup);
}
}
if (end > groupEnd) {
if (_equals(key, groupKey)) {
- group = new GroupedRangeList<E>(groupStart, end, key);
+ group = GroupedRangeList<E>(groupStart, end, key);
} else {
- var newGroup = new GroupedRangeList<E>(groupEnd + 1, end, key);
+ final newGroup = GroupedRangeList<E>(groupEnd + 1, end, key);
newGroups.add(newGroup);
}
}
} else {
if (_equals(key, groupKey)) {
if (groupStart == end + 1) {
- group = new GroupedRangeList<E>(start, groupEnd, key);
+ group = GroupedRangeList<E>(start, groupEnd, key);
} else if (start == groupEnd + 1) {
- group = new GroupedRangeList<E>(groupStart, end, key);
+ group = GroupedRangeList<E>(groupStart, end, key);
} else {
newGroups.add(current);
}
diff --git a/lists/lib/src/step_list.dart b/lists/lib/src/step_list.dart
index 91dec1b..7baaa56 100755
--- a/lists/lib/src/step_list.dart
+++ b/lists/lib/src/step_list.dart
@@ -11,18 +11,18 @@
StepList(this.start, this.end, [int step]) {
if (start == null) {
- throw new ArgumentError("start: $start");
+ throw ArgumentError('start: $start');
}
if (end == null) {
- throw new ArgumentError("end: $end");
+ throw ArgumentError('end: $end');
}
if (step == 0) {
- throw new ArgumentError("step: $step");
+ throw ArgumentError('step: $step');
}
- var count = end - start;
+ final count = end - start;
if (step == null) {
if (count > 0) {
_step = 1;
@@ -42,33 +42,38 @@
}
/// Returns the length of list.
+ @override
int get length => _length;
/// Sets the length of list.
+ @override
set length(int length) {
- throw new UnsupportedError("length=");
+ throw UnsupportedError('length=');
}
/// Returns the step.
int get step => _step;
+ @override
int operator [](int index) {
if (index == null) {
- throw new ArgumentError("index: $index");
+ throw ArgumentError('index: $index');
}
if (index < 0 || index >= _length) {
- throw new RangeError(index);
+ throw RangeError(index);
}
return start + step * index;
}
+ @override
void operator []=(int index, int value) {
- throw new UnsupportedError("operator []=");
+ throw UnsupportedError('operator []=');
}
/// Returns true if list contains the [value]; otherwise false.
+ @override
bool contains(value) {
if (value == null || value is! int) {
return false;
@@ -78,8 +83,8 @@
return value == start;
}
- var position = (value as int) - start;
- var index = position ~/ step;
+ final position = (value as int) - start;
+ final index = position ~/ step;
if (index >= 0 && index < _length) {
if (position % index == 0) {
return true;
@@ -90,11 +95,12 @@
}
/// Returns the string representation of range.
+ @override
String toString() {
if (step > 0) {
- return "[$start..$end; +$step]";
+ return '[$start..$end; +$step]';
} else {
- return "[$start..$end; $step]";
+ return '[$start..$end; $step]';
}
}
}
diff --git a/lists/lib/src/wrapped_list.dart b/lists/lib/src/wrapped_list.dart
index ba98fc2..26acca4 100755
--- a/lists/lib/src/wrapped_list.dart
+++ b/lists/lib/src/wrapped_list.dart
@@ -5,26 +5,31 @@
WrappedList(List<E> source) {
if (source == null) {
- throw new ArgumentError("source: $source");
+ throw ArgumentError('source: $source');
}
_source = source;
}
/// Returns the length of list.
+ @override
int get length => _source.length;
/// Sets the length of list.
+ @override
set length(int length) {
- throw new UnsupportedError("length=");
+ throw UnsupportedError('length=');
}
+ @override
E operator [](int index) => _source[index];
+ @override
void operator []=(int index, E value) {
- throw new UnsupportedError("operator []=");
+ throw UnsupportedError('operator []=');
}
/// Returns the string representation of range.
+ @override
String toString() => _source.toString();
}
diff --git a/lists/pubspec.yaml b/lists/pubspec.yaml
index 845eef9..2f35a95 100755
--- a/lists/pubspec.yaml
+++ b/lists/pubspec.yaml
@@ -1,11 +1,10 @@
name: lists
-version: 0.1.3
-author: Andrew Mezoni <andrew.mezoni@gmail.com>
+version: 0.1.4
description: Collection of the lists (BitList, FilledList, GroupedRangeList, ListPointer, RangeList, SparseBoolList, SparseList, StepList, WrappedList).
homepage: https://github.com/mezoni/lists
environment:
sdk: '>=1.0.0 <3.0.0'
dependencies:
dev_dependencies:
- pedantic: any
+ pedantic: ^1.9.0
test: any