Skip to content

Commit 311778b

Browse files
committed
Initialize dart-lang/tuple with the tuple package at v1.0.1.
--- Update README.google. Merge tag 'v1.0.1' of ../tuple-orig Merge pull request #2 from nex3/strong Fix all strong-mode warnings and errors Fix all strong-mode warnings and errors. Setup Travis CI. Update CHANGELOG.md and bump the version to 1.0.0. Remove _hash function and use hash functions provided by quiver_hashcode. Merge pull request #1 from srawlins/complete-changelog Complete changelog Complete changelog Bump the version to 0.4.0. Add CHANGELOG.md. Add fromList factory constructor. Add me to AUTHROS. Add Tuple6 and Tuple7 classes. Bump the version to 0.3.0. Add toList() to tuple classes. Add .pub and doc to .gitignore. Add API documentation to tuple classes. Bump the version to 0.2.0. Redesign the tuple API. * Rename PersistentTuple to Tuple and remove mutable tuple classes. * Rename iN to itemN. * Rename setIN to withItemN. Bump the version to 0.1.2. * Add me as an author. * Change homepage to https://github.com/kseo/tuple. Add test cases for tuple. Fix a bug in == operator of PersistentTuple classes. Check if o is of PersistentTuple type, not Tuple. 0.1.1 Merge pull request #3 from kseo/mapkey Override operator == and hashCode. Merge pull request #2 from kseo/addoverride Add @OverRide annotation to toString(). Merge pull request #1 from kseo/gitignore Add .packages file to .gitignore. Add @OverRide annotation to toString(). Add .packages file to .gitignore. As of 1.12, the .packages file exists after running pub get. Don’t check it into source control. Override operator == and hashCode. This makes it possible to use tuples as keys in maps. Initial commit BUG= [email protected], [email protected] Review-Url: https://codereview.chromium.org/2939773003 .
1 parent 25609b3 commit 311778b

File tree

14 files changed

+746
-3
lines changed

14 files changed

+746
-3
lines changed

.analysis_options

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
analyzer:
2+
strong-mode: true

.gitignore

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# https://www.dartlang.org/tools/private-files.html
2+
3+
pubspec.lock
4+
5+
build/
6+
.packages
7+
packages
8+
9+
.pub
10+
doc
11+
12+
.buildlog
13+
*.js_
14+
*.js.deps
15+
*.js.map
16+
*.dart.js
17+
18+
# Eclipse
19+
.project
20+
21+
# IntelliJ
22+
*.iml
23+
*.ipr
24+
*.iws
25+
.idea/
26+
27+
# Mac
28+
.DS_Store

.travis.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
language: dart
2+
sudo: false
3+
dart:
4+
- stable
5+
- dev
6+
script: ./tool/travis.sh
7+
env:
8+
- DARTANALYZER_FLAGS=--fatal-warnings

AUTHORS

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# Below is a list of people and organizations that have contributed
2+
# to the tuple project. Names should be added to the list like
3+
# so:
4+
#
5+
# Name/Organization <email address>
6+
7+
Boris Kaul <[email protected]>
8+
Kwang Yul Seo <[email protected]>

CHANGELOG.md

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
#### 1.0.1
2+
* Fix all strong-mode warnings and errors.
3+
4+
#### 1.0.0
5+
* Remove _hash function and use quiver_hashcode package instead.
6+
7+
#### 0.4.0
8+
* Add fromList factory constructor.
9+
* Add Tuple6 and Tuple7 classes.
10+
11+
#### 0.3.0
12+
* Add toList method.
13+
14+
#### 0.2.0
15+
* Rename PersistentTuple classes to Tuple; remove Tuple classes.
16+
* Rename each iN item to itemN.
17+
* Rename setIN to withItemN.
18+
19+
#### 0.1.2
20+
* Fix a bug in == operator of PersistentTuple classes.
21+
22+
#### 0.1.1
23+
* Add operator == and hashCode to classes, so that tuples may be used as
24+
keys in hashes.
25+
26+
#### 0.1.0
27+
* Initial release.

LICENSE

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
Copyright (c) 2014, the tuple project authors.
2+
All rights reserved.
3+
4+
Redistribution and use in source and binary forms, with or without
5+
modification, are permitted provided that the following conditions are met:
6+
7+
* Redistributions of source code must retain the above copyright
8+
notice, this list of conditions and the following disclaimer.
9+
* Redistributions in binary form must reproduce the above copyright
10+
notice, this list of conditions and the following disclaimer in the
11+
documentation and/or other materials provided with the distribution.
12+
13+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
14+
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
15+
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
16+
DISCLAIMED. IN NO EVENT SHALL <COPYRIGHT HOLDER> BE LIABLE FOR ANY
17+
DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
18+
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
19+
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
20+
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
21+
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
22+
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

README.google

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ Date: October 29, 2016
66
License: BSD 2-clause "Simplified" License
77

88
Description:
9-
This directory contains the tuple package as downloaded from
10-
https://github.com/kseo/tuple/archive/v1.0.1.tar.gz on June
11-
13, 2017.
9+
This directory contains the tuple package as checked
10+
out from [email protected]:kseo/tuple.git at tag v1.0.1
11+
on June 13, 2017.
12+

README.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# Tuple data structure
2+
3+
- [Tuple2], [Tuple3]...
4+
5+
[![Build Status](https://travis-ci.org/kseo/tuple.svg)](https://travis-ci.org/kseo/tuple)
6+
[![Coverage Status](https://coveralls.io/repos/kseo/tuple/badge.svg?branch=master&service=github)](https://coveralls.io/github/kseo/tuple?branch=master)
7+
8+
## Usage example
9+
10+
```dart
11+
const t = const Tuple2<String, int>('a', 10);
12+
13+
print(t.item1); // prints 'a'
14+
print(t.item2); // prints '10'
15+
```
16+
17+
```dart
18+
final t1 = const Tuple2<String, int>('a', 10);
19+
final t2 = t1.withItem1('c');
20+
// t2 is a new [Tuple2] object with item1 is 'c' and item2 is 10.
21+
```

0 commit comments

Comments
 (0)