Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(424)

Side by Side Diff: packages/quiver/lib/core.dart

Issue 2989763002: Update charted to 0.4.8 and roll (Closed)
Patch Set: Removed Cutch from list of reviewers Created 3 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « packages/quiver/lib/collection.dart ('k') | packages/quiver/lib/io.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 Google Inc. All Rights Reserved. 1 // Copyright 2013 Google Inc. All Rights Reserved.
2 // 2 //
3 // Licensed under the Apache License, Version 2.0 (the "License"); 3 // Licensed under the Apache License, Version 2.0 (the "License");
4 // you may not use this file except in compliance with the License. 4 // you may not use this file except in compliance with the License.
5 // You may obtain a copy of the License at 5 // You may obtain a copy of the License at
6 // 6 //
7 // http://www.apache.org/licenses/LICENSE-2.0 7 // http://www.apache.org/licenses/LICENSE-2.0
8 // 8 //
9 // Unless required by applicable law or agreed to in writing, software 9 // Unless required by applicable law or agreed to in writing, software
10 // distributed under the License is distributed on an "AS IS" BASIS, 10 // distributed under the License is distributed on an "AS IS" BASIS,
11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 // See the License for the specific language governing permissions and 12 // See the License for the specific language governing permissions and
13 // limitations under the License. 13 // limitations under the License.
14 14
15 /** 15 /// Simple code with broad use cases.
16 * Simple code with broad use cases.
17 */
18 library quiver.core; 16 library quiver.core;
19 17
18 import 'dart:collection';
19
20 part 'src/core/hash.dart'; 20 part 'src/core/hash.dart';
21 part 'src/core/optional.dart'; 21 part 'src/core/optional.dart';
22 22
23 /** 23 /// Returns the first non-null argument. If all arguments are null, throws an
24 * Returns the first non-null argument. If all arguments are null, throws 24 /// [ArgumentError].
25 * an [ArgumentError]. 25 ///
26 * 26 /// Note: if [o1] is an [Optional], this can be accomplished with `o1.or(o2)`.
27 * Note: if [o1] is an [Optional], this can be accomplished with `o1.or(o2)`.
28 */
29 firstNonNull(o1, o2, [o3, o4]) { 27 firstNonNull(o1, o2, [o3, o4]) {
30 if (o1 != null) return o1; 28 if (o1 != null) return o1;
31 if (o2 != null) return o2; 29 if (o2 != null) return o2;
32 if (o3 != null) return o3; 30 if (o3 != null) return o3;
33 if (o4 != null) return o4; 31 if (o4 != null) return o4;
34 throw new ArgumentError('All arguments were null'); 32 throw new ArgumentError('All arguments were null');
35 } 33 }
OLDNEW
« no previous file with comments | « packages/quiver/lib/collection.dart ('k') | packages/quiver/lib/io.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698