| OLD | NEW |
| 1 library svg; | 1 library svg; |
| 2 | 2 |
| 3 import 'dart:async'; | 3 import 'dart:async'; |
| 4 import 'dart:collection'; | 4 import 'dart:collection'; |
| 5 import 'dart:collection-dev'; |
| 5 import 'dart:html'; | 6 import 'dart:html'; |
| 6 import 'dart:html_common'; | 7 import 'dart:html_common'; |
| 7 import 'dart:nativewrappers'; | 8 import 'dart:nativewrappers'; |
| 8 // DO NOT EDIT | 9 // DO NOT EDIT |
| 9 // Auto-generated dart:svg library. | 10 // Auto-generated dart:svg library. |
| 10 | 11 |
| 11 | 12 |
| 12 | 13 |
| 13 | 14 |
| 14 | 15 |
| (...skipping 3936 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3951 // SVG Collections expose numberOfItems rather than length. | 3952 // SVG Collections expose numberOfItems rather than length. |
| 3952 int get length => numberOfItems; | 3953 int get length => numberOfItems; |
| 3953 dynamic reduce(dynamic initialValue, dynamic combine(dynamic, Length)) { | 3954 dynamic reduce(dynamic initialValue, dynamic combine(dynamic, Length)) { |
| 3954 return IterableMixinWorkaround.reduce(this, initialValue, combine); | 3955 return IterableMixinWorkaround.reduce(this, initialValue, combine); |
| 3955 } | 3956 } |
| 3956 | 3957 |
| 3957 bool contains(Length element) => IterableMixinWorkaround.contains(this, elemen
t); | 3958 bool contains(Length element) => IterableMixinWorkaround.contains(this, elemen
t); |
| 3958 | 3959 |
| 3959 void forEach(void f(Length element)) => IterableMixinWorkaround.forEach(this,
f); | 3960 void forEach(void f(Length element)) => IterableMixinWorkaround.forEach(this,
f); |
| 3960 | 3961 |
| 3961 String join([String separator]) => IterableMixinWorkaround.joinList(this, sepa
rator); | 3962 String join([String separator]) => |
| 3963 IterableMixinWorkaround.joinList(this, separator); |
| 3962 | 3964 |
| 3963 List mappedBy(f(Length element)) => IterableMixinWorkaround.mappedByList(this,
f); | 3965 List mappedBy(f(Length element)) => IterableMixinWorkaround.mappedByList(this,
f); |
| 3964 | 3966 |
| 3965 Iterable<Length> where(bool f(Length element)) => IterableMixinWorkaround.wher
e(this, f); | 3967 Iterable<Length> where(bool f(Length element)) => |
| 3968 IterableMixinWorkaround.where(this, f); |
| 3966 | 3969 |
| 3967 bool every(bool f(Length element)) => IterableMixinWorkaround.every(this, f); | 3970 bool every(bool f(Length element)) => IterableMixinWorkaround.every(this, f); |
| 3968 | 3971 |
| 3969 bool any(bool f(Length element)) => IterableMixinWorkaround.any(this, f); | 3972 bool any(bool f(Length element)) => IterableMixinWorkaround.any(this, f); |
| 3970 | 3973 |
| 3971 List<Length> toList() => new List<Length>.from(this); | 3974 List<Length> toList() => new List<Length>.from(this); |
| 3972 Set<Length> toSet() => new Set<Length>.from(this); | 3975 Set<Length> toSet() => new Set<Length>.from(this); |
| 3973 | 3976 |
| 3974 bool get isEmpty => this.length == 0; | 3977 bool get isEmpty => this.length == 0; |
| 3975 | 3978 |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4015 throw new UnsupportedError("Cannot add to immutable List."); | 4018 throw new UnsupportedError("Cannot add to immutable List."); |
| 4016 } | 4019 } |
| 4017 | 4020 |
| 4018 // From List<Length>: | 4021 // From List<Length>: |
| 4019 void set length(int value) { | 4022 void set length(int value) { |
| 4020 throw new UnsupportedError("Cannot resize immutable List."); | 4023 throw new UnsupportedError("Cannot resize immutable List."); |
| 4021 } | 4024 } |
| 4022 | 4025 |
| 4023 // clear() defined by IDL. | 4026 // clear() defined by IDL. |
| 4024 | 4027 |
| 4028 List<Length> get reversed => |
| 4029 new ReversedListView<Length>(this, 0, null); |
| 4030 |
| 4025 void sort([int compare(Length a, Length b)]) { | 4031 void sort([int compare(Length a, Length b)]) { |
| 4026 throw new UnsupportedError("Cannot sort immutable List."); | 4032 throw new UnsupportedError("Cannot sort immutable List."); |
| 4027 } | 4033 } |
| 4028 | 4034 |
| 4029 int indexOf(Length element, [int start = 0]) => | 4035 int indexOf(Length element, [int start = 0]) => |
| 4030 Lists.indexOf(this, element, start, this.length); | 4036 Lists.indexOf(this, element, start, this.length); |
| 4031 | 4037 |
| 4032 int lastIndexOf(Length element, [int start]) { | 4038 int lastIndexOf(Length element, [int start]) { |
| 4033 if (start == null) start = length - 1; | 4039 if (start == null) start = length - 1; |
| 4034 return Lists.lastIndexOf(this, element, start); | 4040 return Lists.lastIndexOf(this, element, start); |
| 4035 } | 4041 } |
| 4036 | 4042 |
| 4037 Length get first { | 4043 Length get first { |
| 4038 if (this.length > 0) return this[0]; | 4044 if (this.length > 0) return this[0]; |
| 4039 throw new StateError("No elements"); | 4045 throw new StateError("No elements"); |
| 4040 } | 4046 } |
| 4041 | 4047 |
| 4042 Length get last { | 4048 Length get last { |
| 4043 if (this.length > 0) return this[this.length - 1]; | 4049 if (this.length > 0) return this[this.length - 1]; |
| 4044 throw new StateError("No elements"); | 4050 throw new StateError("No elements"); |
| 4045 } | 4051 } |
| 4046 | 4052 |
| 4047 Length get single { | 4053 Length get single { |
| 4048 if (length == 1) return this[0]; | 4054 if (length == 1) return this[0]; |
| 4049 if (length == 0) throw new StateError("No elements"); | 4055 if (length == 0) throw new StateError("No elements"); |
| 4050 throw new StateError("More than one element"); | 4056 throw new StateError("More than one element"); |
| 4051 } | 4057 } |
| 4052 | 4058 |
| 4053 Length min([int compare(Length a, Length b)]) => IterableMixinWorkaround.min(t
his, compare); | 4059 Length min([int compare(Length a, Length b)]) => |
| 4060 IterableMixinWorkaround.min(this, compare); |
| 4054 | 4061 |
| 4055 Length max([int compare(Length a, Length b)]) => IterableMixinWorkaround.max(t
his, compare); | 4062 Length max([int compare(Length a, Length b)]) => |
| 4063 IterableMixinWorkaround.max(this, compare); |
| 4056 | 4064 |
| 4057 Length removeAt(int pos) { | 4065 Length removeAt(int pos) { |
| 4058 throw new UnsupportedError("Cannot remove from immutable List."); | 4066 throw new UnsupportedError("Cannot remove from immutable List."); |
| 4059 } | 4067 } |
| 4060 | 4068 |
| 4061 Length removeLast() { | 4069 Length removeLast() { |
| 4062 throw new UnsupportedError("Cannot remove from immutable List."); | 4070 throw new UnsupportedError("Cannot remove from immutable List."); |
| 4063 } | 4071 } |
| 4064 | 4072 |
| 4065 void remove(Object object) { | 4073 void remove(Object object) { |
| (...skipping 643 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4709 // SVG Collections expose numberOfItems rather than length. | 4717 // SVG Collections expose numberOfItems rather than length. |
| 4710 int get length => numberOfItems; | 4718 int get length => numberOfItems; |
| 4711 dynamic reduce(dynamic initialValue, dynamic combine(dynamic, Number)) { | 4719 dynamic reduce(dynamic initialValue, dynamic combine(dynamic, Number)) { |
| 4712 return IterableMixinWorkaround.reduce(this, initialValue, combine); | 4720 return IterableMixinWorkaround.reduce(this, initialValue, combine); |
| 4713 } | 4721 } |
| 4714 | 4722 |
| 4715 bool contains(Number element) => IterableMixinWorkaround.contains(this, elemen
t); | 4723 bool contains(Number element) => IterableMixinWorkaround.contains(this, elemen
t); |
| 4716 | 4724 |
| 4717 void forEach(void f(Number element)) => IterableMixinWorkaround.forEach(this,
f); | 4725 void forEach(void f(Number element)) => IterableMixinWorkaround.forEach(this,
f); |
| 4718 | 4726 |
| 4719 String join([String separator]) => IterableMixinWorkaround.joinList(this, sepa
rator); | 4727 String join([String separator]) => |
| 4728 IterableMixinWorkaround.joinList(this, separator); |
| 4720 | 4729 |
| 4721 List mappedBy(f(Number element)) => IterableMixinWorkaround.mappedByList(this,
f); | 4730 List mappedBy(f(Number element)) => IterableMixinWorkaround.mappedByList(this,
f); |
| 4722 | 4731 |
| 4723 Iterable<Number> where(bool f(Number element)) => IterableMixinWorkaround.wher
e(this, f); | 4732 Iterable<Number> where(bool f(Number element)) => |
| 4733 IterableMixinWorkaround.where(this, f); |
| 4724 | 4734 |
| 4725 bool every(bool f(Number element)) => IterableMixinWorkaround.every(this, f); | 4735 bool every(bool f(Number element)) => IterableMixinWorkaround.every(this, f); |
| 4726 | 4736 |
| 4727 bool any(bool f(Number element)) => IterableMixinWorkaround.any(this, f); | 4737 bool any(bool f(Number element)) => IterableMixinWorkaround.any(this, f); |
| 4728 | 4738 |
| 4729 List<Number> toList() => new List<Number>.from(this); | 4739 List<Number> toList() => new List<Number>.from(this); |
| 4730 Set<Number> toSet() => new Set<Number>.from(this); | 4740 Set<Number> toSet() => new Set<Number>.from(this); |
| 4731 | 4741 |
| 4732 bool get isEmpty => this.length == 0; | 4742 bool get isEmpty => this.length == 0; |
| 4733 | 4743 |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4773 throw new UnsupportedError("Cannot add to immutable List."); | 4783 throw new UnsupportedError("Cannot add to immutable List."); |
| 4774 } | 4784 } |
| 4775 | 4785 |
| 4776 // From List<Number>: | 4786 // From List<Number>: |
| 4777 void set length(int value) { | 4787 void set length(int value) { |
| 4778 throw new UnsupportedError("Cannot resize immutable List."); | 4788 throw new UnsupportedError("Cannot resize immutable List."); |
| 4779 } | 4789 } |
| 4780 | 4790 |
| 4781 // clear() defined by IDL. | 4791 // clear() defined by IDL. |
| 4782 | 4792 |
| 4793 List<Number> get reversed => |
| 4794 new ReversedListView<Number>(this, 0, null); |
| 4795 |
| 4783 void sort([int compare(Number a, Number b)]) { | 4796 void sort([int compare(Number a, Number b)]) { |
| 4784 throw new UnsupportedError("Cannot sort immutable List."); | 4797 throw new UnsupportedError("Cannot sort immutable List."); |
| 4785 } | 4798 } |
| 4786 | 4799 |
| 4787 int indexOf(Number element, [int start = 0]) => | 4800 int indexOf(Number element, [int start = 0]) => |
| 4788 Lists.indexOf(this, element, start, this.length); | 4801 Lists.indexOf(this, element, start, this.length); |
| 4789 | 4802 |
| 4790 int lastIndexOf(Number element, [int start]) { | 4803 int lastIndexOf(Number element, [int start]) { |
| 4791 if (start == null) start = length - 1; | 4804 if (start == null) start = length - 1; |
| 4792 return Lists.lastIndexOf(this, element, start); | 4805 return Lists.lastIndexOf(this, element, start); |
| 4793 } | 4806 } |
| 4794 | 4807 |
| 4795 Number get first { | 4808 Number get first { |
| 4796 if (this.length > 0) return this[0]; | 4809 if (this.length > 0) return this[0]; |
| 4797 throw new StateError("No elements"); | 4810 throw new StateError("No elements"); |
| 4798 } | 4811 } |
| 4799 | 4812 |
| 4800 Number get last { | 4813 Number get last { |
| 4801 if (this.length > 0) return this[this.length - 1]; | 4814 if (this.length > 0) return this[this.length - 1]; |
| 4802 throw new StateError("No elements"); | 4815 throw new StateError("No elements"); |
| 4803 } | 4816 } |
| 4804 | 4817 |
| 4805 Number get single { | 4818 Number get single { |
| 4806 if (length == 1) return this[0]; | 4819 if (length == 1) return this[0]; |
| 4807 if (length == 0) throw new StateError("No elements"); | 4820 if (length == 0) throw new StateError("No elements"); |
| 4808 throw new StateError("More than one element"); | 4821 throw new StateError("More than one element"); |
| 4809 } | 4822 } |
| 4810 | 4823 |
| 4811 Number min([int compare(Number a, Number b)]) => IterableMixinWorkaround.min(t
his, compare); | 4824 Number min([int compare(Number a, Number b)]) => |
| 4825 IterableMixinWorkaround.min(this, compare); |
| 4812 | 4826 |
| 4813 Number max([int compare(Number a, Number b)]) => IterableMixinWorkaround.max(t
his, compare); | 4827 Number max([int compare(Number a, Number b)]) => |
| 4828 IterableMixinWorkaround.max(this, compare); |
| 4814 | 4829 |
| 4815 Number removeAt(int pos) { | 4830 Number removeAt(int pos) { |
| 4816 throw new UnsupportedError("Cannot remove from immutable List."); | 4831 throw new UnsupportedError("Cannot remove from immutable List."); |
| 4817 } | 4832 } |
| 4818 | 4833 |
| 4819 Number removeLast() { | 4834 Number removeLast() { |
| 4820 throw new UnsupportedError("Cannot remove from immutable List."); | 4835 throw new UnsupportedError("Cannot remove from immutable List."); |
| 4821 } | 4836 } |
| 4822 | 4837 |
| 4823 void remove(Object object) { | 4838 void remove(Object object) { |
| (...skipping 1061 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5885 // SVG Collections expose numberOfItems rather than length. | 5900 // SVG Collections expose numberOfItems rather than length. |
| 5886 int get length => numberOfItems; | 5901 int get length => numberOfItems; |
| 5887 dynamic reduce(dynamic initialValue, dynamic combine(dynamic, PathSeg)) { | 5902 dynamic reduce(dynamic initialValue, dynamic combine(dynamic, PathSeg)) { |
| 5888 return IterableMixinWorkaround.reduce(this, initialValue, combine); | 5903 return IterableMixinWorkaround.reduce(this, initialValue, combine); |
| 5889 } | 5904 } |
| 5890 | 5905 |
| 5891 bool contains(PathSeg element) => IterableMixinWorkaround.contains(this, eleme
nt); | 5906 bool contains(PathSeg element) => IterableMixinWorkaround.contains(this, eleme
nt); |
| 5892 | 5907 |
| 5893 void forEach(void f(PathSeg element)) => IterableMixinWorkaround.forEach(this,
f); | 5908 void forEach(void f(PathSeg element)) => IterableMixinWorkaround.forEach(this,
f); |
| 5894 | 5909 |
| 5895 String join([String separator]) => IterableMixinWorkaround.joinList(this, sepa
rator); | 5910 String join([String separator]) => |
| 5911 IterableMixinWorkaround.joinList(this, separator); |
| 5896 | 5912 |
| 5897 List mappedBy(f(PathSeg element)) => IterableMixinWorkaround.mappedByList(this
, f); | 5913 List mappedBy(f(PathSeg element)) => IterableMixinWorkaround.mappedByList(this
, f); |
| 5898 | 5914 |
| 5899 Iterable<PathSeg> where(bool f(PathSeg element)) => IterableMixinWorkaround.wh
ere(this, f); | 5915 Iterable<PathSeg> where(bool f(PathSeg element)) => |
| 5916 IterableMixinWorkaround.where(this, f); |
| 5900 | 5917 |
| 5901 bool every(bool f(PathSeg element)) => IterableMixinWorkaround.every(this, f); | 5918 bool every(bool f(PathSeg element)) => IterableMixinWorkaround.every(this, f); |
| 5902 | 5919 |
| 5903 bool any(bool f(PathSeg element)) => IterableMixinWorkaround.any(this, f); | 5920 bool any(bool f(PathSeg element)) => IterableMixinWorkaround.any(this, f); |
| 5904 | 5921 |
| 5905 List<PathSeg> toList() => new List<PathSeg>.from(this); | 5922 List<PathSeg> toList() => new List<PathSeg>.from(this); |
| 5906 Set<PathSeg> toSet() => new Set<PathSeg>.from(this); | 5923 Set<PathSeg> toSet() => new Set<PathSeg>.from(this); |
| 5907 | 5924 |
| 5908 bool get isEmpty => this.length == 0; | 5925 bool get isEmpty => this.length == 0; |
| 5909 | 5926 |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5949 throw new UnsupportedError("Cannot add to immutable List."); | 5966 throw new UnsupportedError("Cannot add to immutable List."); |
| 5950 } | 5967 } |
| 5951 | 5968 |
| 5952 // From List<PathSeg>: | 5969 // From List<PathSeg>: |
| 5953 void set length(int value) { | 5970 void set length(int value) { |
| 5954 throw new UnsupportedError("Cannot resize immutable List."); | 5971 throw new UnsupportedError("Cannot resize immutable List."); |
| 5955 } | 5972 } |
| 5956 | 5973 |
| 5957 // clear() defined by IDL. | 5974 // clear() defined by IDL. |
| 5958 | 5975 |
| 5976 List<PathSeg> get reversed => |
| 5977 new ReversedListView<PathSeg>(this, 0, null); |
| 5978 |
| 5959 void sort([int compare(PathSeg a, PathSeg b)]) { | 5979 void sort([int compare(PathSeg a, PathSeg b)]) { |
| 5960 throw new UnsupportedError("Cannot sort immutable List."); | 5980 throw new UnsupportedError("Cannot sort immutable List."); |
| 5961 } | 5981 } |
| 5962 | 5982 |
| 5963 int indexOf(PathSeg element, [int start = 0]) => | 5983 int indexOf(PathSeg element, [int start = 0]) => |
| 5964 Lists.indexOf(this, element, start, this.length); | 5984 Lists.indexOf(this, element, start, this.length); |
| 5965 | 5985 |
| 5966 int lastIndexOf(PathSeg element, [int start]) { | 5986 int lastIndexOf(PathSeg element, [int start]) { |
| 5967 if (start == null) start = length - 1; | 5987 if (start == null) start = length - 1; |
| 5968 return Lists.lastIndexOf(this, element, start); | 5988 return Lists.lastIndexOf(this, element, start); |
| 5969 } | 5989 } |
| 5970 | 5990 |
| 5971 PathSeg get first { | 5991 PathSeg get first { |
| 5972 if (this.length > 0) return this[0]; | 5992 if (this.length > 0) return this[0]; |
| 5973 throw new StateError("No elements"); | 5993 throw new StateError("No elements"); |
| 5974 } | 5994 } |
| 5975 | 5995 |
| 5976 PathSeg get last { | 5996 PathSeg get last { |
| 5977 if (this.length > 0) return this[this.length - 1]; | 5997 if (this.length > 0) return this[this.length - 1]; |
| 5978 throw new StateError("No elements"); | 5998 throw new StateError("No elements"); |
| 5979 } | 5999 } |
| 5980 | 6000 |
| 5981 PathSeg get single { | 6001 PathSeg get single { |
| 5982 if (length == 1) return this[0]; | 6002 if (length == 1) return this[0]; |
| 5983 if (length == 0) throw new StateError("No elements"); | 6003 if (length == 0) throw new StateError("No elements"); |
| 5984 throw new StateError("More than one element"); | 6004 throw new StateError("More than one element"); |
| 5985 } | 6005 } |
| 5986 | 6006 |
| 5987 PathSeg min([int compare(PathSeg a, PathSeg b)]) => IterableMixinWorkaround.mi
n(this, compare); | 6007 PathSeg min([int compare(PathSeg a, PathSeg b)]) => |
| 6008 IterableMixinWorkaround.min(this, compare); |
| 5988 | 6009 |
| 5989 PathSeg max([int compare(PathSeg a, PathSeg b)]) => IterableMixinWorkaround.ma
x(this, compare); | 6010 PathSeg max([int compare(PathSeg a, PathSeg b)]) => |
| 6011 IterableMixinWorkaround.max(this, compare); |
| 5990 | 6012 |
| 5991 PathSeg removeAt(int pos) { | 6013 PathSeg removeAt(int pos) { |
| 5992 throw new UnsupportedError("Cannot remove from immutable List."); | 6014 throw new UnsupportedError("Cannot remove from immutable List."); |
| 5993 } | 6015 } |
| 5994 | 6016 |
| 5995 PathSeg removeLast() { | 6017 PathSeg removeLast() { |
| 5996 throw new UnsupportedError("Cannot remove from immutable List."); | 6018 throw new UnsupportedError("Cannot remove from immutable List."); |
| 5997 } | 6019 } |
| 5998 | 6020 |
| 5999 void remove(Object object) { | 6021 void remove(Object object) { |
| (...skipping 901 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6901 // SVG Collections expose numberOfItems rather than length. | 6923 // SVG Collections expose numberOfItems rather than length. |
| 6902 int get length => numberOfItems; | 6924 int get length => numberOfItems; |
| 6903 dynamic reduce(dynamic initialValue, dynamic combine(dynamic, String)) { | 6925 dynamic reduce(dynamic initialValue, dynamic combine(dynamic, String)) { |
| 6904 return IterableMixinWorkaround.reduce(this, initialValue, combine); | 6926 return IterableMixinWorkaround.reduce(this, initialValue, combine); |
| 6905 } | 6927 } |
| 6906 | 6928 |
| 6907 bool contains(String element) => IterableMixinWorkaround.contains(this, elemen
t); | 6929 bool contains(String element) => IterableMixinWorkaround.contains(this, elemen
t); |
| 6908 | 6930 |
| 6909 void forEach(void f(String element)) => IterableMixinWorkaround.forEach(this,
f); | 6931 void forEach(void f(String element)) => IterableMixinWorkaround.forEach(this,
f); |
| 6910 | 6932 |
| 6911 String join([String separator]) => IterableMixinWorkaround.joinList(this, sepa
rator); | 6933 String join([String separator]) => |
| 6934 IterableMixinWorkaround.joinList(this, separator); |
| 6912 | 6935 |
| 6913 List mappedBy(f(String element)) => IterableMixinWorkaround.mappedByList(this,
f); | 6936 List mappedBy(f(String element)) => IterableMixinWorkaround.mappedByList(this,
f); |
| 6914 | 6937 |
| 6915 Iterable<String> where(bool f(String element)) => IterableMixinWorkaround.wher
e(this, f); | 6938 Iterable<String> where(bool f(String element)) => |
| 6939 IterableMixinWorkaround.where(this, f); |
| 6916 | 6940 |
| 6917 bool every(bool f(String element)) => IterableMixinWorkaround.every(this, f); | 6941 bool every(bool f(String element)) => IterableMixinWorkaround.every(this, f); |
| 6918 | 6942 |
| 6919 bool any(bool f(String element)) => IterableMixinWorkaround.any(this, f); | 6943 bool any(bool f(String element)) => IterableMixinWorkaround.any(this, f); |
| 6920 | 6944 |
| 6921 List<String> toList() => new List<String>.from(this); | 6945 List<String> toList() => new List<String>.from(this); |
| 6922 Set<String> toSet() => new Set<String>.from(this); | 6946 Set<String> toSet() => new Set<String>.from(this); |
| 6923 | 6947 |
| 6924 bool get isEmpty => this.length == 0; | 6948 bool get isEmpty => this.length == 0; |
| 6925 | 6949 |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6965 throw new UnsupportedError("Cannot add to immutable List."); | 6989 throw new UnsupportedError("Cannot add to immutable List."); |
| 6966 } | 6990 } |
| 6967 | 6991 |
| 6968 // From List<String>: | 6992 // From List<String>: |
| 6969 void set length(int value) { | 6993 void set length(int value) { |
| 6970 throw new UnsupportedError("Cannot resize immutable List."); | 6994 throw new UnsupportedError("Cannot resize immutable List."); |
| 6971 } | 6995 } |
| 6972 | 6996 |
| 6973 // clear() defined by IDL. | 6997 // clear() defined by IDL. |
| 6974 | 6998 |
| 6999 List<String> get reversed => |
| 7000 new ReversedListView<String>(this, 0, null); |
| 7001 |
| 6975 void sort([int compare(String a, String b)]) { | 7002 void sort([int compare(String a, String b)]) { |
| 6976 throw new UnsupportedError("Cannot sort immutable List."); | 7003 throw new UnsupportedError("Cannot sort immutable List."); |
| 6977 } | 7004 } |
| 6978 | 7005 |
| 6979 int indexOf(String element, [int start = 0]) => | 7006 int indexOf(String element, [int start = 0]) => |
| 6980 Lists.indexOf(this, element, start, this.length); | 7007 Lists.indexOf(this, element, start, this.length); |
| 6981 | 7008 |
| 6982 int lastIndexOf(String element, [int start]) { | 7009 int lastIndexOf(String element, [int start]) { |
| 6983 if (start == null) start = length - 1; | 7010 if (start == null) start = length - 1; |
| 6984 return Lists.lastIndexOf(this, element, start); | 7011 return Lists.lastIndexOf(this, element, start); |
| 6985 } | 7012 } |
| 6986 | 7013 |
| 6987 String get first { | 7014 String get first { |
| 6988 if (this.length > 0) return this[0]; | 7015 if (this.length > 0) return this[0]; |
| 6989 throw new StateError("No elements"); | 7016 throw new StateError("No elements"); |
| 6990 } | 7017 } |
| 6991 | 7018 |
| 6992 String get last { | 7019 String get last { |
| 6993 if (this.length > 0) return this[this.length - 1]; | 7020 if (this.length > 0) return this[this.length - 1]; |
| 6994 throw new StateError("No elements"); | 7021 throw new StateError("No elements"); |
| 6995 } | 7022 } |
| 6996 | 7023 |
| 6997 String get single { | 7024 String get single { |
| 6998 if (length == 1) return this[0]; | 7025 if (length == 1) return this[0]; |
| 6999 if (length == 0) throw new StateError("No elements"); | 7026 if (length == 0) throw new StateError("No elements"); |
| 7000 throw new StateError("More than one element"); | 7027 throw new StateError("More than one element"); |
| 7001 } | 7028 } |
| 7002 | 7029 |
| 7003 String min([int compare(String a, String b)]) => IterableMixinWorkaround.min(t
his, compare); | 7030 String min([int compare(String a, String b)]) => |
| 7031 IterableMixinWorkaround.min(this, compare); |
| 7004 | 7032 |
| 7005 String max([int compare(String a, String b)]) => IterableMixinWorkaround.max(t
his, compare); | 7033 String max([int compare(String a, String b)]) => |
| 7034 IterableMixinWorkaround.max(this, compare); |
| 7006 | 7035 |
| 7007 String removeAt(int pos) { | 7036 String removeAt(int pos) { |
| 7008 throw new UnsupportedError("Cannot remove from immutable List."); | 7037 throw new UnsupportedError("Cannot remove from immutable List."); |
| 7009 } | 7038 } |
| 7010 | 7039 |
| 7011 String removeLast() { | 7040 String removeLast() { |
| 7012 throw new UnsupportedError("Cannot remove from immutable List."); | 7041 throw new UnsupportedError("Cannot remove from immutable List."); |
| 7013 } | 7042 } |
| 7014 | 7043 |
| 7015 void remove(Object object) { | 7044 void remove(Object object) { |
| (...skipping 1196 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 8212 // SVG Collections expose numberOfItems rather than length. | 8241 // SVG Collections expose numberOfItems rather than length. |
| 8213 int get length => numberOfItems; | 8242 int get length => numberOfItems; |
| 8214 dynamic reduce(dynamic initialValue, dynamic combine(dynamic, Transform)) { | 8243 dynamic reduce(dynamic initialValue, dynamic combine(dynamic, Transform)) { |
| 8215 return IterableMixinWorkaround.reduce(this, initialValue, combine); | 8244 return IterableMixinWorkaround.reduce(this, initialValue, combine); |
| 8216 } | 8245 } |
| 8217 | 8246 |
| 8218 bool contains(Transform element) => IterableMixinWorkaround.contains(this, ele
ment); | 8247 bool contains(Transform element) => IterableMixinWorkaround.contains(this, ele
ment); |
| 8219 | 8248 |
| 8220 void forEach(void f(Transform element)) => IterableMixinWorkaround.forEach(thi
s, f); | 8249 void forEach(void f(Transform element)) => IterableMixinWorkaround.forEach(thi
s, f); |
| 8221 | 8250 |
| 8222 String join([String separator]) => IterableMixinWorkaround.joinList(this, sepa
rator); | 8251 String join([String separator]) => |
| 8252 IterableMixinWorkaround.joinList(this, separator); |
| 8223 | 8253 |
| 8224 List mappedBy(f(Transform element)) => IterableMixinWorkaround.mappedByList(th
is, f); | 8254 List mappedBy(f(Transform element)) => IterableMixinWorkaround.mappedByList(th
is, f); |
| 8225 | 8255 |
| 8226 Iterable<Transform> where(bool f(Transform element)) => IterableMixinWorkaroun
d.where(this, f); | 8256 Iterable<Transform> where(bool f(Transform element)) => |
| 8257 IterableMixinWorkaround.where(this, f); |
| 8227 | 8258 |
| 8228 bool every(bool f(Transform element)) => IterableMixinWorkaround.every(this, f
); | 8259 bool every(bool f(Transform element)) => IterableMixinWorkaround.every(this, f
); |
| 8229 | 8260 |
| 8230 bool any(bool f(Transform element)) => IterableMixinWorkaround.any(this, f); | 8261 bool any(bool f(Transform element)) => IterableMixinWorkaround.any(this, f); |
| 8231 | 8262 |
| 8232 List<Transform> toList() => new List<Transform>.from(this); | 8263 List<Transform> toList() => new List<Transform>.from(this); |
| 8233 Set<Transform> toSet() => new Set<Transform>.from(this); | 8264 Set<Transform> toSet() => new Set<Transform>.from(this); |
| 8234 | 8265 |
| 8235 bool get isEmpty => this.length == 0; | 8266 bool get isEmpty => this.length == 0; |
| 8236 | 8267 |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 8276 throw new UnsupportedError("Cannot add to immutable List."); | 8307 throw new UnsupportedError("Cannot add to immutable List."); |
| 8277 } | 8308 } |
| 8278 | 8309 |
| 8279 // From List<Transform>: | 8310 // From List<Transform>: |
| 8280 void set length(int value) { | 8311 void set length(int value) { |
| 8281 throw new UnsupportedError("Cannot resize immutable List."); | 8312 throw new UnsupportedError("Cannot resize immutable List."); |
| 8282 } | 8313 } |
| 8283 | 8314 |
| 8284 // clear() defined by IDL. | 8315 // clear() defined by IDL. |
| 8285 | 8316 |
| 8317 List<Transform> get reversed => |
| 8318 new ReversedListView<Transform>(this, 0, null); |
| 8319 |
| 8286 void sort([int compare(Transform a, Transform b)]) { | 8320 void sort([int compare(Transform a, Transform b)]) { |
| 8287 throw new UnsupportedError("Cannot sort immutable List."); | 8321 throw new UnsupportedError("Cannot sort immutable List."); |
| 8288 } | 8322 } |
| 8289 | 8323 |
| 8290 int indexOf(Transform element, [int start = 0]) => | 8324 int indexOf(Transform element, [int start = 0]) => |
| 8291 Lists.indexOf(this, element, start, this.length); | 8325 Lists.indexOf(this, element, start, this.length); |
| 8292 | 8326 |
| 8293 int lastIndexOf(Transform element, [int start]) { | 8327 int lastIndexOf(Transform element, [int start]) { |
| 8294 if (start == null) start = length - 1; | 8328 if (start == null) start = length - 1; |
| 8295 return Lists.lastIndexOf(this, element, start); | 8329 return Lists.lastIndexOf(this, element, start); |
| 8296 } | 8330 } |
| 8297 | 8331 |
| 8298 Transform get first { | 8332 Transform get first { |
| 8299 if (this.length > 0) return this[0]; | 8333 if (this.length > 0) return this[0]; |
| 8300 throw new StateError("No elements"); | 8334 throw new StateError("No elements"); |
| 8301 } | 8335 } |
| 8302 | 8336 |
| 8303 Transform get last { | 8337 Transform get last { |
| 8304 if (this.length > 0) return this[this.length - 1]; | 8338 if (this.length > 0) return this[this.length - 1]; |
| 8305 throw new StateError("No elements"); | 8339 throw new StateError("No elements"); |
| 8306 } | 8340 } |
| 8307 | 8341 |
| 8308 Transform get single { | 8342 Transform get single { |
| 8309 if (length == 1) return this[0]; | 8343 if (length == 1) return this[0]; |
| 8310 if (length == 0) throw new StateError("No elements"); | 8344 if (length == 0) throw new StateError("No elements"); |
| 8311 throw new StateError("More than one element"); | 8345 throw new StateError("More than one element"); |
| 8312 } | 8346 } |
| 8313 | 8347 |
| 8314 Transform min([int compare(Transform a, Transform b)]) => IterableMixinWorkaro
und.min(this, compare); | 8348 Transform min([int compare(Transform a, Transform b)]) => |
| 8349 IterableMixinWorkaround.min(this, compare); |
| 8315 | 8350 |
| 8316 Transform max([int compare(Transform a, Transform b)]) => IterableMixinWorkaro
und.max(this, compare); | 8351 Transform max([int compare(Transform a, Transform b)]) => |
| 8352 IterableMixinWorkaround.max(this, compare); |
| 8317 | 8353 |
| 8318 Transform removeAt(int pos) { | 8354 Transform removeAt(int pos) { |
| 8319 throw new UnsupportedError("Cannot remove from immutable List."); | 8355 throw new UnsupportedError("Cannot remove from immutable List."); |
| 8320 } | 8356 } |
| 8321 | 8357 |
| 8322 Transform removeLast() { | 8358 Transform removeLast() { |
| 8323 throw new UnsupportedError("Cannot remove from immutable List."); | 8359 throw new UnsupportedError("Cannot remove from immutable List."); |
| 8324 } | 8360 } |
| 8325 | 8361 |
| 8326 void remove(Object object) { | 8362 void remove(Object object) { |
| (...skipping 470 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 8797 } | 8833 } |
| 8798 | 8834 |
| 8799 dynamic reduce(dynamic initialValue, dynamic combine(dynamic, ElementInstance)
) { | 8835 dynamic reduce(dynamic initialValue, dynamic combine(dynamic, ElementInstance)
) { |
| 8800 return IterableMixinWorkaround.reduce(this, initialValue, combine); | 8836 return IterableMixinWorkaround.reduce(this, initialValue, combine); |
| 8801 } | 8837 } |
| 8802 | 8838 |
| 8803 bool contains(ElementInstance element) => IterableMixinWorkaround.contains(thi
s, element); | 8839 bool contains(ElementInstance element) => IterableMixinWorkaround.contains(thi
s, element); |
| 8804 | 8840 |
| 8805 void forEach(void f(ElementInstance element)) => IterableMixinWorkaround.forEa
ch(this, f); | 8841 void forEach(void f(ElementInstance element)) => IterableMixinWorkaround.forEa
ch(this, f); |
| 8806 | 8842 |
| 8807 String join([String separator]) => IterableMixinWorkaround.joinList(this, sepa
rator); | 8843 String join([String separator]) => |
| 8844 IterableMixinWorkaround.joinList(this, separator); |
| 8808 | 8845 |
| 8809 List mappedBy(f(ElementInstance element)) => IterableMixinWorkaround.mappedByL
ist(this, f); | 8846 List mappedBy(f(ElementInstance element)) => IterableMixinWorkaround.mappedByL
ist(this, f); |
| 8810 | 8847 |
| 8811 Iterable<ElementInstance> where(bool f(ElementInstance element)) => IterableMi
xinWorkaround.where(this, f); | 8848 Iterable<ElementInstance> where(bool f(ElementInstance element)) => |
| 8849 IterableMixinWorkaround.where(this, f); |
| 8812 | 8850 |
| 8813 bool every(bool f(ElementInstance element)) => IterableMixinWorkaround.every(t
his, f); | 8851 bool every(bool f(ElementInstance element)) => IterableMixinWorkaround.every(t
his, f); |
| 8814 | 8852 |
| 8815 bool any(bool f(ElementInstance element)) => IterableMixinWorkaround.any(this,
f); | 8853 bool any(bool f(ElementInstance element)) => IterableMixinWorkaround.any(this,
f); |
| 8816 | 8854 |
| 8817 List<ElementInstance> toList() => new List<ElementInstance>.from(this); | 8855 List<ElementInstance> toList() => new List<ElementInstance>.from(this); |
| 8818 Set<ElementInstance> toSet() => new Set<ElementInstance>.from(this); | 8856 Set<ElementInstance> toSet() => new Set<ElementInstance>.from(this); |
| 8819 | 8857 |
| 8820 bool get isEmpty => this.length == 0; | 8858 bool get isEmpty => this.length == 0; |
| 8821 | 8859 |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 8863 | 8901 |
| 8864 // From List<ElementInstance>: | 8902 // From List<ElementInstance>: |
| 8865 void set length(int value) { | 8903 void set length(int value) { |
| 8866 throw new UnsupportedError("Cannot resize immutable List."); | 8904 throw new UnsupportedError("Cannot resize immutable List."); |
| 8867 } | 8905 } |
| 8868 | 8906 |
| 8869 void clear() { | 8907 void clear() { |
| 8870 throw new UnsupportedError("Cannot clear immutable List."); | 8908 throw new UnsupportedError("Cannot clear immutable List."); |
| 8871 } | 8909 } |
| 8872 | 8910 |
| 8911 List<ElementInstance> get reversed => |
| 8912 new ReversedListView<ElementInstance>(this, 0, null); |
| 8913 |
| 8873 void sort([int compare(ElementInstance a, ElementInstance b)]) { | 8914 void sort([int compare(ElementInstance a, ElementInstance b)]) { |
| 8874 throw new UnsupportedError("Cannot sort immutable List."); | 8915 throw new UnsupportedError("Cannot sort immutable List."); |
| 8875 } | 8916 } |
| 8876 | 8917 |
| 8877 int indexOf(ElementInstance element, [int start = 0]) => | 8918 int indexOf(ElementInstance element, [int start = 0]) => |
| 8878 Lists.indexOf(this, element, start, this.length); | 8919 Lists.indexOf(this, element, start, this.length); |
| 8879 | 8920 |
| 8880 int lastIndexOf(ElementInstance element, [int start]) { | 8921 int lastIndexOf(ElementInstance element, [int start]) { |
| 8881 if (start == null) start = length - 1; | 8922 if (start == null) start = length - 1; |
| 8882 return Lists.lastIndexOf(this, element, start); | 8923 return Lists.lastIndexOf(this, element, start); |
| 8883 } | 8924 } |
| 8884 | 8925 |
| 8885 ElementInstance get first { | 8926 ElementInstance get first { |
| 8886 if (this.length > 0) return this[0]; | 8927 if (this.length > 0) return this[0]; |
| 8887 throw new StateError("No elements"); | 8928 throw new StateError("No elements"); |
| 8888 } | 8929 } |
| 8889 | 8930 |
| 8890 ElementInstance get last { | 8931 ElementInstance get last { |
| 8891 if (this.length > 0) return this[this.length - 1]; | 8932 if (this.length > 0) return this[this.length - 1]; |
| 8892 throw new StateError("No elements"); | 8933 throw new StateError("No elements"); |
| 8893 } | 8934 } |
| 8894 | 8935 |
| 8895 ElementInstance get single { | 8936 ElementInstance get single { |
| 8896 if (length == 1) return this[0]; | 8937 if (length == 1) return this[0]; |
| 8897 if (length == 0) throw new StateError("No elements"); | 8938 if (length == 0) throw new StateError("No elements"); |
| 8898 throw new StateError("More than one element"); | 8939 throw new StateError("More than one element"); |
| 8899 } | 8940 } |
| 8900 | 8941 |
| 8901 ElementInstance min([int compare(ElementInstance a, ElementInstance b)]) => It
erableMixinWorkaround.min(this, compare); | 8942 ElementInstance min([int compare(ElementInstance a, ElementInstance b)]) => |
| 8943 IterableMixinWorkaround.min(this, compare); |
| 8902 | 8944 |
| 8903 ElementInstance max([int compare(ElementInstance a, ElementInstance b)]) => It
erableMixinWorkaround.max(this, compare); | 8945 ElementInstance max([int compare(ElementInstance a, ElementInstance b)]) => |
| 8946 IterableMixinWorkaround.max(this, compare); |
| 8904 | 8947 |
| 8905 ElementInstance removeAt(int pos) { | 8948 ElementInstance removeAt(int pos) { |
| 8906 throw new UnsupportedError("Cannot remove from immutable List."); | 8949 throw new UnsupportedError("Cannot remove from immutable List."); |
| 8907 } | 8950 } |
| 8908 | 8951 |
| 8909 ElementInstance removeLast() { | 8952 ElementInstance removeLast() { |
| 8910 throw new UnsupportedError("Cannot remove from immutable List."); | 8953 throw new UnsupportedError("Cannot remove from immutable List."); |
| 8911 } | 8954 } |
| 8912 | 8955 |
| 8913 void remove(Object object) { | 8956 void remove(Object object) { |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 8945 List<ElementInstance> getRange(int start, int rangeLength) => | 8988 List<ElementInstance> getRange(int start, int rangeLength) => |
| 8946 Lists.getRange(this, start, rangeLength, <ElementInstance>[]); | 8989 Lists.getRange(this, start, rangeLength, <ElementInstance>[]); |
| 8947 | 8990 |
| 8948 // -- end List<ElementInstance> mixins. | 8991 // -- end List<ElementInstance> mixins. |
| 8949 | 8992 |
| 8950 @DomName('SVGElementInstanceList.item') | 8993 @DomName('SVGElementInstanceList.item') |
| 8951 @DocsEditable | 8994 @DocsEditable |
| 8952 ElementInstance item(int index) native "SVGElementInstanceList_item_Callback"; | 8995 ElementInstance item(int index) native "SVGElementInstanceList_item_Callback"; |
| 8953 | 8996 |
| 8954 } | 8997 } |
| OLD | NEW |