OLD | NEW |
---|---|
1 library svg; | 1 library svg; |
2 | 2 |
3 import 'dart:collection'; | 3 import 'dart:collection'; |
4 import 'dart:html'; | 4 import 'dart:html'; |
5 import 'dart:html_common'; | 5 import 'dart:html_common'; |
6 // DO NOT EDIT | 6 // DO NOT EDIT |
7 // Auto-generated dart:svg library. | 7 // Auto-generated dart:svg library. |
8 | 8 |
9 | 9 |
10 | 10 |
(...skipping 2879 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2890 Length get first { | 2890 Length get first { |
2891 if (this.length > 0) return this[0]; | 2891 if (this.length > 0) return this[0]; |
2892 throw new StateError("No elements"); | 2892 throw new StateError("No elements"); |
2893 } | 2893 } |
2894 | 2894 |
2895 Length get last { | 2895 Length get last { |
2896 if (this.length > 0) return this[this.length - 1]; | 2896 if (this.length > 0) return this[this.length - 1]; |
2897 throw new StateError("No elements"); | 2897 throw new StateError("No elements"); |
2898 } | 2898 } |
2899 | 2899 |
2900 Length get single { | |
2901 if (length == 1) return this[0]; | |
2902 if (length == 0) throw new StateError("No elements"); | |
2903 throw new StateError("More than one element"); | |
2904 } | |
2905 | |
2906 Length min([int compare(Length a, Length b)]) => _Collections.minInList(this, compare); | |
Anders Johnsen
2013/01/02 11:04:05
Where is minInList defined?
Lasse Reichstein Nielsen
2013/01/02 11:49:33
in _Collections! :P
It's a helper class in _Collec
| |
2907 | |
2908 Length max([int compare(Length a, Length b)]) => _Collections.maxInList(this, compare); | |
2909 | |
2900 Length removeAt(int pos) { | 2910 Length removeAt(int pos) { |
2901 throw new UnsupportedError("Cannot removeAt on immutable List."); | 2911 throw new UnsupportedError("Cannot removeAt on immutable List."); |
2902 } | 2912 } |
2903 | 2913 |
2904 Length removeLast() { | 2914 Length removeLast() { |
2905 throw new UnsupportedError("Cannot removeLast on immutable List."); | 2915 throw new UnsupportedError("Cannot removeLast on immutable List."); |
2906 } | 2916 } |
2907 | 2917 |
2908 void setRange(int start, int rangeLength, List<Length> from, [int startFrom]) { | 2918 void setRange(int start, int rangeLength, List<Length> from, [int startFrom]) { |
2909 throw new UnsupportedError("Cannot setRange on immutable List."); | 2919 throw new UnsupportedError("Cannot setRange on immutable List."); |
(...skipping 541 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
3451 Number get first { | 3461 Number get first { |
3452 if (this.length > 0) return this[0]; | 3462 if (this.length > 0) return this[0]; |
3453 throw new StateError("No elements"); | 3463 throw new StateError("No elements"); |
3454 } | 3464 } |
3455 | 3465 |
3456 Number get last { | 3466 Number get last { |
3457 if (this.length > 0) return this[this.length - 1]; | 3467 if (this.length > 0) return this[this.length - 1]; |
3458 throw new StateError("No elements"); | 3468 throw new StateError("No elements"); |
3459 } | 3469 } |
3460 | 3470 |
3471 Number get single { | |
3472 if (length == 1) return this[0]; | |
3473 if (length == 0) throw new StateError("No elements"); | |
3474 throw new StateError("More than one element"); | |
3475 } | |
3476 | |
3477 Number min([int compare(Number a, Number b)]) => _Collections.minInList(this, compare); | |
3478 | |
3479 Number max([int compare(Number a, Number b)]) => _Collections.maxInList(this, compare); | |
3480 | |
3461 Number removeAt(int pos) { | 3481 Number removeAt(int pos) { |
3462 throw new UnsupportedError("Cannot removeAt on immutable List."); | 3482 throw new UnsupportedError("Cannot removeAt on immutable List."); |
3463 } | 3483 } |
3464 | 3484 |
3465 Number removeLast() { | 3485 Number removeLast() { |
3466 throw new UnsupportedError("Cannot removeLast on immutable List."); | 3486 throw new UnsupportedError("Cannot removeLast on immutable List."); |
3467 } | 3487 } |
3468 | 3488 |
3469 void setRange(int start, int rangeLength, List<Number> from, [int startFrom]) { | 3489 void setRange(int start, int rangeLength, List<Number> from, [int startFrom]) { |
3470 throw new UnsupportedError("Cannot setRange on immutable List."); | 3490 throw new UnsupportedError("Cannot setRange on immutable List."); |
(...skipping 716 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
4187 PathSeg get first { | 4207 PathSeg get first { |
4188 if (this.length > 0) return this[0]; | 4208 if (this.length > 0) return this[0]; |
4189 throw new StateError("No elements"); | 4209 throw new StateError("No elements"); |
4190 } | 4210 } |
4191 | 4211 |
4192 PathSeg get last { | 4212 PathSeg get last { |
4193 if (this.length > 0) return this[this.length - 1]; | 4213 if (this.length > 0) return this[this.length - 1]; |
4194 throw new StateError("No elements"); | 4214 throw new StateError("No elements"); |
4195 } | 4215 } |
4196 | 4216 |
4217 PathSeg get single { | |
4218 if (length == 1) return this[0]; | |
4219 if (length == 0) throw new StateError("No elements"); | |
4220 throw new StateError("More than one element"); | |
4221 } | |
4222 | |
4223 PathSeg min([int compare(PathSeg a, PathSeg b)]) => _Collections.minInList(thi s, compare); | |
4224 | |
4225 PathSeg max([int compare(PathSeg a, PathSeg b)]) => _Collections.maxInList(thi s, compare); | |
4226 | |
4197 PathSeg removeAt(int pos) { | 4227 PathSeg removeAt(int pos) { |
4198 throw new UnsupportedError("Cannot removeAt on immutable List."); | 4228 throw new UnsupportedError("Cannot removeAt on immutable List."); |
4199 } | 4229 } |
4200 | 4230 |
4201 PathSeg removeLast() { | 4231 PathSeg removeLast() { |
4202 throw new UnsupportedError("Cannot removeLast on immutable List."); | 4232 throw new UnsupportedError("Cannot removeLast on immutable List."); |
4203 } | 4233 } |
4204 | 4234 |
4205 void setRange(int start, int rangeLength, List<PathSeg> from, [int startFrom]) { | 4235 void setRange(int start, int rangeLength, List<PathSeg> from, [int startFrom]) { |
4206 throw new UnsupportedError("Cannot setRange on immutable List."); | 4236 throw new UnsupportedError("Cannot setRange on immutable List."); |
(...skipping 741 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
4948 String get first { | 4978 String get first { |
4949 if (this.length > 0) return this[0]; | 4979 if (this.length > 0) return this[0]; |
4950 throw new StateError("No elements"); | 4980 throw new StateError("No elements"); |
4951 } | 4981 } |
4952 | 4982 |
4953 String get last { | 4983 String get last { |
4954 if (this.length > 0) return this[this.length - 1]; | 4984 if (this.length > 0) return this[this.length - 1]; |
4955 throw new StateError("No elements"); | 4985 throw new StateError("No elements"); |
4956 } | 4986 } |
4957 | 4987 |
4988 String get single { | |
4989 if (length == 1) return this[0]; | |
4990 if (length == 0) throw new StateError("No elements"); | |
4991 throw new StateError("More than one element"); | |
4992 } | |
4993 | |
4994 String min([int compare(String a, String b)]) => _Collections.minInList(this, compare); | |
4995 | |
4996 String max([int compare(String a, String b)]) => _Collections.maxInList(this, compare); | |
4997 | |
4958 String removeAt(int pos) { | 4998 String removeAt(int pos) { |
4959 throw new UnsupportedError("Cannot removeAt on immutable List."); | 4999 throw new UnsupportedError("Cannot removeAt on immutable List."); |
4960 } | 5000 } |
4961 | 5001 |
4962 String removeLast() { | 5002 String removeLast() { |
4963 throw new UnsupportedError("Cannot removeLast on immutable List."); | 5003 throw new UnsupportedError("Cannot removeLast on immutable List."); |
4964 } | 5004 } |
4965 | 5005 |
4966 void setRange(int start, int rangeLength, List<String> from, [int startFrom]) { | 5006 void setRange(int start, int rangeLength, List<String> from, [int startFrom]) { |
4967 throw new UnsupportedError("Cannot setRange on immutable List."); | 5007 throw new UnsupportedError("Cannot setRange on immutable List."); |
(...skipping 1009 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
5977 Transform get first { | 6017 Transform get first { |
5978 if (this.length > 0) return this[0]; | 6018 if (this.length > 0) return this[0]; |
5979 throw new StateError("No elements"); | 6019 throw new StateError("No elements"); |
5980 } | 6020 } |
5981 | 6021 |
5982 Transform get last { | 6022 Transform get last { |
5983 if (this.length > 0) return this[this.length - 1]; | 6023 if (this.length > 0) return this[this.length - 1]; |
5984 throw new StateError("No elements"); | 6024 throw new StateError("No elements"); |
5985 } | 6025 } |
5986 | 6026 |
6027 Transform get single { | |
6028 if (length == 1) return this[0]; | |
6029 if (length == 0) throw new StateError("No elements"); | |
6030 throw new StateError("More than one element"); | |
6031 } | |
6032 | |
6033 Transform min([int compare(Transform a, Transform b)]) => _Collections.minInLi st(this, compare); | |
6034 | |
6035 Transform max([int compare(Transform a, Transform b)]) => _Collections.maxInLi st(this, compare); | |
6036 | |
5987 Transform removeAt(int pos) { | 6037 Transform removeAt(int pos) { |
5988 throw new UnsupportedError("Cannot removeAt on immutable List."); | 6038 throw new UnsupportedError("Cannot removeAt on immutable List."); |
5989 } | 6039 } |
5990 | 6040 |
5991 Transform removeLast() { | 6041 Transform removeLast() { |
5992 throw new UnsupportedError("Cannot removeLast on immutable List."); | 6042 throw new UnsupportedError("Cannot removeLast on immutable List."); |
5993 } | 6043 } |
5994 | 6044 |
5995 void setRange(int start, int rangeLength, List<Transform> from, [int startFrom ]) { | 6045 void setRange(int start, int rangeLength, List<Transform> from, [int startFrom ]) { |
5996 throw new UnsupportedError("Cannot setRange on immutable List."); | 6046 throw new UnsupportedError("Cannot setRange on immutable List."); |
(...skipping 423 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
6420 ElementInstance get first { | 6470 ElementInstance get first { |
6421 if (this.length > 0) return this[0]; | 6471 if (this.length > 0) return this[0]; |
6422 throw new StateError("No elements"); | 6472 throw new StateError("No elements"); |
6423 } | 6473 } |
6424 | 6474 |
6425 ElementInstance get last { | 6475 ElementInstance get last { |
6426 if (this.length > 0) return this[this.length - 1]; | 6476 if (this.length > 0) return this[this.length - 1]; |
6427 throw new StateError("No elements"); | 6477 throw new StateError("No elements"); |
6428 } | 6478 } |
6429 | 6479 |
6480 ElementInstance get single { | |
6481 if (length == 1) return this[0]; | |
6482 if (length == 0) throw new StateError("No elements"); | |
6483 throw new StateError("More than one element"); | |
6484 } | |
6485 | |
6486 ElementInstance min([int compare(ElementInstance a, ElementInstance b)]) => _C ollections.minInList(this, compare); | |
6487 | |
6488 ElementInstance max([int compare(ElementInstance a, ElementInstance b)]) => _C ollections.maxInList(this, compare); | |
6489 | |
6430 ElementInstance removeAt(int pos) { | 6490 ElementInstance removeAt(int pos) { |
6431 throw new UnsupportedError("Cannot removeAt on immutable List."); | 6491 throw new UnsupportedError("Cannot removeAt on immutable List."); |
6432 } | 6492 } |
6433 | 6493 |
6434 ElementInstance removeLast() { | 6494 ElementInstance removeLast() { |
6435 throw new UnsupportedError("Cannot removeLast on immutable List."); | 6495 throw new UnsupportedError("Cannot removeLast on immutable List."); |
6436 } | 6496 } |
6437 | 6497 |
6438 void setRange(int start, int rangeLength, List<ElementInstance> from, [int sta rtFrom]) { | 6498 void setRange(int start, int rangeLength, List<ElementInstance> from, [int sta rtFrom]) { |
6439 throw new UnsupportedError("Cannot setRange on immutable List."); | 6499 throw new UnsupportedError("Cannot setRange on immutable List."); |
6440 } | 6500 } |
6441 | 6501 |
6442 void removeRange(int start, int rangeLength) { | 6502 void removeRange(int start, int rangeLength) { |
6443 throw new UnsupportedError("Cannot removeRange on immutable List."); | 6503 throw new UnsupportedError("Cannot removeRange on immutable List."); |
6444 } | 6504 } |
6445 | 6505 |
6446 void insertRange(int start, int rangeLength, [ElementInstance initialValue]) { | 6506 void insertRange(int start, int rangeLength, [ElementInstance initialValue]) { |
6447 throw new UnsupportedError("Cannot insertRange on immutable List."); | 6507 throw new UnsupportedError("Cannot insertRange on immutable List."); |
6448 } | 6508 } |
6449 | 6509 |
6450 List<ElementInstance> getRange(int start, int rangeLength) => | 6510 List<ElementInstance> getRange(int start, int rangeLength) => |
6451 Lists.getRange(this, start, rangeLength, <ElementInstance>[]); | 6511 Lists.getRange(this, start, rangeLength, <ElementInstance>[]); |
6452 | 6512 |
6453 // -- end List<ElementInstance> mixins. | 6513 // -- end List<ElementInstance> mixins. |
6454 | 6514 |
6455 /// @domName SVGElementInstanceList.item; @docsEditable true | 6515 /// @domName SVGElementInstanceList.item; @docsEditable true |
6456 ElementInstance item(int index) native; | 6516 ElementInstance item(int index) native; |
6457 } | 6517 } |
OLD | NEW |