OLD | NEW |
1 dart_library.library('dart/collection', null, /* Imports */[ | 1 dart_library.library('dart/collection', null, /* Imports */[ |
2 'dart/_runtime', | 2 'dart/_runtime', |
3 'dart/core' | 3 'dart/core' |
4 ], /* Lazy imports */[ | 4 ], /* Lazy imports */[ |
5 'dart/_internal', | 5 'dart/_internal', |
6 'dart/_js_helper', | 6 'dart/_js_helper', |
7 'dart/math' | 7 'dart/math' |
8 ], function(exports, dart, core, _internal, _js_helper, math) { | 8 ], function(exports, dart, core, _internal, _js_helper, math) { |
9 'use strict'; | 9 'use strict'; |
10 let dartx = dart.dartx; | 10 let dartx = dart.dartx; |
(...skipping 1538 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1549 methods: () => ({ | 1549 methods: () => ({ |
1550 unlink: [dart.void, []], | 1550 unlink: [dart.void, []], |
1551 insertAfter: [dart.void, [E]], | 1551 insertAfter: [dart.void, [E]], |
1552 insertBefore: [dart.void, [E]] | 1552 insertBefore: [dart.void, [E]] |
1553 }) | 1553 }) |
1554 }); | 1554 }); |
1555 return LinkedListEntry; | 1555 return LinkedListEntry; |
1556 }); | 1556 }); |
1557 let LinkedListEntry = LinkedListEntry$(); | 1557 let LinkedListEntry = LinkedListEntry$(); |
1558 const ListMixin$ = dart.generic(function(E) { | 1558 const ListMixin$ = dart.generic(function(E) { |
| 1559 dart.defineExtensionNames([ |
| 1560 'iterator', |
| 1561 'elementAt', |
| 1562 'forEach', |
| 1563 'isEmpty', |
| 1564 'isNotEmpty', |
| 1565 'first', |
| 1566 'last', |
| 1567 'single', |
| 1568 'contains', |
| 1569 'every', |
| 1570 'any', |
| 1571 'firstWhere', |
| 1572 'lastWhere', |
| 1573 'singleWhere', |
| 1574 'join', |
| 1575 'where', |
| 1576 'map', |
| 1577 'expand', |
| 1578 'reduce', |
| 1579 'fold', |
| 1580 'skip', |
| 1581 'skipWhile', |
| 1582 'take', |
| 1583 'takeWhile', |
| 1584 'toList', |
| 1585 'toSet', |
| 1586 'add', |
| 1587 'addAll', |
| 1588 'remove', |
| 1589 'removeWhere', |
| 1590 'retainWhere', |
| 1591 'clear', |
| 1592 'removeLast', |
| 1593 'sort', |
| 1594 'shuffle', |
| 1595 'asMap', |
| 1596 'sublist', |
| 1597 'getRange', |
| 1598 'removeRange', |
| 1599 'fillRange', |
| 1600 'setRange', |
| 1601 'replaceRange', |
| 1602 'indexOf', |
| 1603 'lastIndexOf', |
| 1604 'insert', |
| 1605 'removeAt', |
| 1606 'insertAll', |
| 1607 'setAll', |
| 1608 'reversed', |
| 1609 'toString' |
| 1610 ]); |
1559 class ListMixin extends core.Object { | 1611 class ListMixin extends core.Object { |
1560 get iterator() { | 1612 get [dartx.iterator]() { |
1561 return new (_internal.ListIterator$(E))(this); | 1613 return new (_internal.ListIterator$(E))(this); |
1562 } | 1614 } |
1563 [Symbol.iterator]() { | 1615 [Symbol.iterator]() { |
1564 return new dart.JsIterator(this.iterator); | 1616 return new dart.JsIterator(this[dartx.iterator]); |
1565 } | 1617 } |
1566 elementAt(index) { | 1618 [dartx.elementAt](index) { |
1567 return this.get(index); | 1619 return this[dartx.get](index); |
1568 } | 1620 } |
1569 forEach(action) { | 1621 [dartx.forEach](action) { |
1570 dart.as(action, dart.functionType(dart.void, [E])); | 1622 dart.as(action, dart.functionType(dart.void, [E])); |
1571 let length = this.length; | 1623 let length = this[dartx.length]; |
1572 for (let i = 0; i < dart.notNull(length); i++) { | 1624 for (let i = 0; i < dart.notNull(length); i++) { |
1573 action(this.get(i)); | 1625 action(this[dartx.get](i)); |
1574 if (length != this.length) { | 1626 if (length != this[dartx.length]) { |
1575 dart.throw(new core.ConcurrentModificationError(this)); | 1627 dart.throw(new core.ConcurrentModificationError(this)); |
1576 } | 1628 } |
1577 } | 1629 } |
1578 } | 1630 } |
1579 get isEmpty() { | 1631 get [dartx.isEmpty]() { |
1580 return this[dartx.length] == 0; | 1632 return this[dartx.length] == 0; |
1581 } | 1633 } |
1582 get isNotEmpty() { | 1634 get [dartx.isNotEmpty]() { |
1583 return !dart.notNull(this.isEmpty); | 1635 return !dart.notNull(this[dartx.isEmpty]); |
1584 } | 1636 } |
1585 get first() { | 1637 get [dartx.first]() { |
1586 if (this[dartx.length] == 0) dart.throw(_internal.IterableElementError.n
oElement()); | 1638 if (this[dartx.length] == 0) dart.throw(_internal.IterableElementError.n
oElement()); |
1587 return this.get(0); | 1639 return this[dartx.get](0); |
1588 } | 1640 } |
1589 get last() { | 1641 get [dartx.last]() { |
1590 if (this[dartx.length] == 0) dart.throw(_internal.IterableElementError.n
oElement()); | 1642 if (this[dartx.length] == 0) dart.throw(_internal.IterableElementError.n
oElement()); |
1591 return this.get(dart.notNull(this[dartx.length]) - 1); | 1643 return this[dartx.get](dart.notNull(this[dartx.length]) - 1); |
1592 } | 1644 } |
1593 get single() { | 1645 get [dartx.single]() { |
1594 if (this[dartx.length] == 0) dart.throw(_internal.IterableElementError.n
oElement()); | 1646 if (this[dartx.length] == 0) dart.throw(_internal.IterableElementError.n
oElement()); |
1595 if (dart.notNull(this[dartx.length]) > 1) dart.throw(_internal.IterableE
lementError.tooMany()); | 1647 if (dart.notNull(this[dartx.length]) > 1) dart.throw(_internal.IterableE
lementError.tooMany()); |
1596 return this.get(0); | 1648 return this[dartx.get](0); |
1597 } | 1649 } |
1598 contains(element) { | 1650 [dartx.contains](element) { |
1599 let length = this.length; | 1651 let length = this[dartx.length]; |
1600 for (let i = 0; i < dart.notNull(this.length); i++) { | 1652 for (let i = 0; i < dart.notNull(this[dartx.length]); i++) { |
1601 if (dart.equals(this.get(i), element)) return true; | 1653 if (dart.equals(this[dartx.get](i), element)) return true; |
1602 if (length != this.length) { | 1654 if (length != this[dartx.length]) { |
1603 dart.throw(new core.ConcurrentModificationError(this)); | 1655 dart.throw(new core.ConcurrentModificationError(this)); |
1604 } | 1656 } |
1605 } | 1657 } |
1606 return false; | 1658 return false; |
1607 } | 1659 } |
1608 every(test) { | 1660 [dartx.every](test) { |
1609 dart.as(test, dart.functionType(core.bool, [E])); | 1661 dart.as(test, dart.functionType(core.bool, [E])); |
1610 let length = this.length; | 1662 let length = this[dartx.length]; |
1611 for (let i = 0; i < dart.notNull(length); i++) { | 1663 for (let i = 0; i < dart.notNull(length); i++) { |
1612 if (!dart.notNull(test(this.get(i)))) return false; | 1664 if (!dart.notNull(test(this[dartx.get](i)))) return false; |
1613 if (length != this.length) { | 1665 if (length != this[dartx.length]) { |
1614 dart.throw(new core.ConcurrentModificationError(this)); | 1666 dart.throw(new core.ConcurrentModificationError(this)); |
1615 } | 1667 } |
1616 } | 1668 } |
1617 return true; | 1669 return true; |
1618 } | 1670 } |
1619 any(test) { | 1671 [dartx.any](test) { |
1620 dart.as(test, dart.functionType(core.bool, [E])); | 1672 dart.as(test, dart.functionType(core.bool, [E])); |
1621 let length = this.length; | 1673 let length = this[dartx.length]; |
1622 for (let i = 0; i < dart.notNull(length); i++) { | 1674 for (let i = 0; i < dart.notNull(length); i++) { |
1623 if (dart.notNull(test(this.get(i)))) return true; | 1675 if (dart.notNull(test(this[dartx.get](i)))) return true; |
1624 if (length != this.length) { | 1676 if (length != this[dartx.length]) { |
1625 dart.throw(new core.ConcurrentModificationError(this)); | 1677 dart.throw(new core.ConcurrentModificationError(this)); |
1626 } | 1678 } |
1627 } | 1679 } |
1628 return false; | 1680 return false; |
1629 } | 1681 } |
1630 firstWhere(test, opts) { | 1682 [dartx.firstWhere](test, opts) { |
1631 dart.as(test, dart.functionType(core.bool, [E])); | 1683 dart.as(test, dart.functionType(core.bool, [E])); |
1632 let orElse = opts && 'orElse' in opts ? opts.orElse : null; | 1684 let orElse = opts && 'orElse' in opts ? opts.orElse : null; |
1633 dart.as(orElse, dart.functionType(E, [])); | 1685 dart.as(orElse, dart.functionType(E, [])); |
1634 let length = this.length; | 1686 let length = this[dartx.length]; |
1635 for (let i = 0; i < dart.notNull(length); i++) { | 1687 for (let i = 0; i < dart.notNull(length); i++) { |
1636 let element = this.get(i); | 1688 let element = this[dartx.get](i); |
1637 if (dart.notNull(test(element))) return element; | 1689 if (dart.notNull(test(element))) return element; |
1638 if (length != this.length) { | 1690 if (length != this[dartx.length]) { |
1639 dart.throw(new core.ConcurrentModificationError(this)); | 1691 dart.throw(new core.ConcurrentModificationError(this)); |
1640 } | 1692 } |
1641 } | 1693 } |
1642 if (orElse != null) return orElse(); | 1694 if (orElse != null) return orElse(); |
1643 dart.throw(_internal.IterableElementError.noElement()); | 1695 dart.throw(_internal.IterableElementError.noElement()); |
1644 } | 1696 } |
1645 lastWhere(test, opts) { | 1697 [dartx.lastWhere](test, opts) { |
1646 dart.as(test, dart.functionType(core.bool, [E])); | 1698 dart.as(test, dart.functionType(core.bool, [E])); |
1647 let orElse = opts && 'orElse' in opts ? opts.orElse : null; | 1699 let orElse = opts && 'orElse' in opts ? opts.orElse : null; |
1648 dart.as(orElse, dart.functionType(E, [])); | 1700 dart.as(orElse, dart.functionType(E, [])); |
1649 let length = this.length; | 1701 let length = this[dartx.length]; |
1650 for (let i = dart.notNull(length) - 1; i >= 0; i--) { | 1702 for (let i = dart.notNull(length) - 1; i >= 0; i--) { |
1651 let element = this.get(i); | 1703 let element = this[dartx.get](i); |
1652 if (dart.notNull(test(element))) return element; | 1704 if (dart.notNull(test(element))) return element; |
1653 if (length != this.length) { | 1705 if (length != this[dartx.length]) { |
1654 dart.throw(new core.ConcurrentModificationError(this)); | 1706 dart.throw(new core.ConcurrentModificationError(this)); |
1655 } | 1707 } |
1656 } | 1708 } |
1657 if (orElse != null) return orElse(); | 1709 if (orElse != null) return orElse(); |
1658 dart.throw(_internal.IterableElementError.noElement()); | 1710 dart.throw(_internal.IterableElementError.noElement()); |
1659 } | 1711 } |
1660 singleWhere(test) { | 1712 [dartx.singleWhere](test) { |
1661 dart.as(test, dart.functionType(core.bool, [E])); | 1713 dart.as(test, dart.functionType(core.bool, [E])); |
1662 let length = this.length; | 1714 let length = this[dartx.length]; |
1663 let match = null; | 1715 let match = null; |
1664 let matchFound = false; | 1716 let matchFound = false; |
1665 for (let i = 0; i < dart.notNull(length); i++) { | 1717 for (let i = 0; i < dart.notNull(length); i++) { |
1666 let element = this.get(i); | 1718 let element = this[dartx.get](i); |
1667 if (dart.notNull(test(element))) { | 1719 if (dart.notNull(test(element))) { |
1668 if (matchFound) { | 1720 if (matchFound) { |
1669 dart.throw(_internal.IterableElementError.tooMany()); | 1721 dart.throw(_internal.IterableElementError.tooMany()); |
1670 } | 1722 } |
1671 matchFound = true; | 1723 matchFound = true; |
1672 match = element; | 1724 match = element; |
1673 } | 1725 } |
1674 if (length != this.length) { | 1726 if (length != this[dartx.length]) { |
1675 dart.throw(new core.ConcurrentModificationError(this)); | 1727 dart.throw(new core.ConcurrentModificationError(this)); |
1676 } | 1728 } |
1677 } | 1729 } |
1678 if (matchFound) return match; | 1730 if (matchFound) return match; |
1679 dart.throw(_internal.IterableElementError.noElement()); | 1731 dart.throw(_internal.IterableElementError.noElement()); |
1680 } | 1732 } |
1681 join(separator) { | 1733 [dartx.join](separator) { |
1682 if (separator === void 0) separator = ""; | 1734 if (separator === void 0) separator = ""; |
1683 if (this[dartx.length] == 0) return ""; | 1735 if (this[dartx.length] == 0) return ""; |
1684 let buffer = new core.StringBuffer(); | 1736 let buffer = new core.StringBuffer(); |
1685 buffer.writeAll(this, separator); | 1737 buffer.writeAll(this, separator); |
1686 return dart.toString(buffer); | 1738 return dart.toString(buffer); |
1687 } | 1739 } |
1688 where(test) { | 1740 [dartx.where](test) { |
1689 dart.as(test, dart.functionType(core.bool, [E])); | 1741 dart.as(test, dart.functionType(core.bool, [E])); |
1690 return new (_internal.WhereIterable$(E))(this, test); | 1742 return new (_internal.WhereIterable$(E))(this, test); |
1691 } | 1743 } |
1692 map(f) { | 1744 [dartx.map](f) { |
1693 dart.as(f, dart.functionType(dart.dynamic, [E])); | 1745 dart.as(f, dart.functionType(dart.dynamic, [E])); |
1694 return new (_internal.MappedListIterable$(E, dart.dynamic))(this, f); | 1746 return new (_internal.MappedListIterable$(E, dart.dynamic))(this, f); |
1695 } | 1747 } |
1696 expand(f) { | 1748 [dartx.expand](f) { |
1697 dart.as(f, dart.functionType(core.Iterable, [E])); | 1749 dart.as(f, dart.functionType(core.Iterable, [E])); |
1698 return new (_internal.ExpandIterable$(E, dart.dynamic))(this, f); | 1750 return new (_internal.ExpandIterable$(E, dart.dynamic))(this, f); |
1699 } | 1751 } |
1700 reduce(combine) { | 1752 [dartx.reduce](combine) { |
1701 dart.as(combine, dart.functionType(E, [E, E])); | 1753 dart.as(combine, dart.functionType(E, [E, E])); |
1702 let length = this.length; | 1754 let length = this[dartx.length]; |
1703 if (length == 0) dart.throw(_internal.IterableElementError.noElement()); | 1755 if (length == 0) dart.throw(_internal.IterableElementError.noElement()); |
1704 let value = this.get(0); | 1756 let value = this[dartx.get](0); |
1705 for (let i = 1; i < dart.notNull(length); i++) { | 1757 for (let i = 1; i < dart.notNull(length); i++) { |
1706 value = combine(value, this.get(i)); | 1758 value = combine(value, this[dartx.get](i)); |
1707 if (length != this.length) { | 1759 if (length != this[dartx.length]) { |
1708 dart.throw(new core.ConcurrentModificationError(this)); | 1760 dart.throw(new core.ConcurrentModificationError(this)); |
1709 } | 1761 } |
1710 } | 1762 } |
1711 return value; | 1763 return value; |
1712 } | 1764 } |
1713 fold(initialValue, combine) { | 1765 [dartx.fold](initialValue, combine) { |
1714 dart.as(combine, dart.functionType(dart.dynamic, [dart.dynamic, E])); | 1766 dart.as(combine, dart.functionType(dart.dynamic, [dart.dynamic, E])); |
1715 let value = initialValue; | 1767 let value = initialValue; |
1716 let length = this.length; | 1768 let length = this[dartx.length]; |
1717 for (let i = 0; i < dart.notNull(length); i++) { | 1769 for (let i = 0; i < dart.notNull(length); i++) { |
1718 value = combine(value, this.get(i)); | 1770 value = combine(value, this[dartx.get](i)); |
1719 if (length != this.length) { | 1771 if (length != this[dartx.length]) { |
1720 dart.throw(new core.ConcurrentModificationError(this)); | 1772 dart.throw(new core.ConcurrentModificationError(this)); |
1721 } | 1773 } |
1722 } | 1774 } |
1723 return value; | 1775 return value; |
1724 } | 1776 } |
1725 skip(count) { | 1777 [dartx.skip](count) { |
1726 return new (_internal.SubListIterable$(E))(this, count, null); | 1778 return new (_internal.SubListIterable$(E))(this, count, null); |
1727 } | 1779 } |
1728 skipWhile(test) { | 1780 [dartx.skipWhile](test) { |
1729 dart.as(test, dart.functionType(core.bool, [E])); | 1781 dart.as(test, dart.functionType(core.bool, [E])); |
1730 return new (_internal.SkipWhileIterable$(E))(this, test); | 1782 return new (_internal.SkipWhileIterable$(E))(this, test); |
1731 } | 1783 } |
1732 take(count) { | 1784 [dartx.take](count) { |
1733 return new (_internal.SubListIterable$(E))(this, 0, count); | 1785 return new (_internal.SubListIterable$(E))(this, 0, count); |
1734 } | 1786 } |
1735 takeWhile(test) { | 1787 [dartx.takeWhile](test) { |
1736 dart.as(test, dart.functionType(core.bool, [E])); | 1788 dart.as(test, dart.functionType(core.bool, [E])); |
1737 return new (_internal.TakeWhileIterable$(E))(this, test); | 1789 return new (_internal.TakeWhileIterable$(E))(this, test); |
1738 } | 1790 } |
1739 toList(opts) { | 1791 [dartx.toList](opts) { |
1740 let growable = opts && 'growable' in opts ? opts.growable : true; | 1792 let growable = opts && 'growable' in opts ? opts.growable : true; |
1741 let result = null; | 1793 let result = null; |
1742 if (dart.notNull(growable)) { | 1794 if (dart.notNull(growable)) { |
1743 result = core.List$(E).new(); | 1795 result = core.List$(E).new(); |
1744 result[dartx.length] = this[dartx.length]; | 1796 result[dartx.length] = this[dartx.length]; |
1745 } else { | 1797 } else { |
1746 result = core.List$(E).new(this[dartx.length]); | 1798 result = core.List$(E).new(this[dartx.length]); |
1747 } | 1799 } |
1748 for (let i = 0; i < dart.notNull(this[dartx.length]); i++) { | 1800 for (let i = 0; i < dart.notNull(this[dartx.length]); i++) { |
1749 result[dartx.set](i, this.get(i)); | 1801 result[dartx.set](i, this[dartx.get](i)); |
1750 } | 1802 } |
1751 return result; | 1803 return result; |
1752 } | 1804 } |
1753 toSet() { | 1805 [dartx.toSet]() { |
1754 let result = core.Set$(E).new(); | 1806 let result = core.Set$(E).new(); |
1755 for (let i = 0; i < dart.notNull(this[dartx.length]); i++) { | 1807 for (let i = 0; i < dart.notNull(this[dartx.length]); i++) { |
1756 result.add(this.get(i)); | 1808 result.add(this[dartx.get](i)); |
1757 } | 1809 } |
1758 return result; | 1810 return result; |
1759 } | 1811 } |
1760 add(element) { | 1812 [dartx.add](element) { |
1761 dart.as(element, E); | 1813 dart.as(element, E); |
1762 this.set((() => { | 1814 this[dartx.set]((() => { |
1763 let x = this.length; | 1815 let x = this[dartx.length]; |
1764 this.length = dart.notNull(x) + 1; | 1816 this[dartx.length] = dart.notNull(x) + 1; |
1765 return x; | 1817 return x; |
1766 })(), element); | 1818 })(), element); |
1767 } | 1819 } |
1768 addAll(iterable) { | 1820 [dartx.addAll](iterable) { |
1769 dart.as(iterable, core.Iterable$(E)); | 1821 dart.as(iterable, core.Iterable$(E)); |
1770 for (let element of iterable) { | 1822 for (let element of iterable) { |
1771 this.set((() => { | 1823 this[dartx.set]((() => { |
1772 let x = this.length; | 1824 let x = this[dartx.length]; |
1773 this.length = dart.notNull(x) + 1; | 1825 this[dartx.length] = dart.notNull(x) + 1; |
1774 return x; | 1826 return x; |
1775 })(), element); | 1827 })(), element); |
1776 } | 1828 } |
1777 } | 1829 } |
1778 remove(element) { | 1830 [dartx.remove](element) { |
1779 for (let i = 0; i < dart.notNull(this.length); i++) { | 1831 for (let i = 0; i < dart.notNull(this[dartx.length]); i++) { |
1780 if (dart.equals(this.get(i), element)) { | 1832 if (dart.equals(this[dartx.get](i), element)) { |
1781 this.setRange(i, dart.notNull(this.length) - 1, this, i + 1); | 1833 this[dartx.setRange](i, dart.notNull(this[dartx.length]) - 1, this,
i + 1); |
1782 this.length = dart.notNull(this.length) - 1; | 1834 this[dartx.length] = dart.notNull(this[dartx.length]) - 1; |
1783 return true; | 1835 return true; |
1784 } | 1836 } |
1785 } | 1837 } |
1786 return false; | 1838 return false; |
1787 } | 1839 } |
1788 removeWhere(test) { | 1840 [dartx.removeWhere](test) { |
1789 dart.as(test, dart.functionType(core.bool, [E])); | 1841 dart.as(test, dart.functionType(core.bool, [E])); |
1790 ListMixin$()._filter(this, test, false); | 1842 ListMixin$()._filter(this, test, false); |
1791 } | 1843 } |
1792 retainWhere(test) { | 1844 [dartx.retainWhere](test) { |
1793 dart.as(test, dart.functionType(core.bool, [E])); | 1845 dart.as(test, dart.functionType(core.bool, [E])); |
1794 ListMixin$()._filter(this, test, true); | 1846 ListMixin$()._filter(this, test, true); |
1795 } | 1847 } |
1796 static _filter(source, test, retainMatching) { | 1848 static _filter(source, test, retainMatching) { |
1797 dart.as(test, dart.functionType(core.bool, [dart.dynamic])); | 1849 dart.as(test, dart.functionType(core.bool, [dart.dynamic])); |
1798 let retained = []; | 1850 let retained = []; |
1799 let length = source[dartx.length]; | 1851 let length = source[dartx.length]; |
1800 for (let i = 0; i < dart.notNull(length); i++) { | 1852 for (let i = 0; i < dart.notNull(length); i++) { |
1801 let element = source[dartx.get](i); | 1853 let element = source[dartx.get](i); |
1802 if (dart.dcall(test, element) == retainMatching) { | 1854 if (dart.dcall(test, element) == retainMatching) { |
1803 retained[dartx.add](element); | 1855 retained[dartx.add](element); |
1804 } | 1856 } |
1805 if (length != source[dartx.length]) { | 1857 if (length != source[dartx.length]) { |
1806 dart.throw(new core.ConcurrentModificationError(source)); | 1858 dart.throw(new core.ConcurrentModificationError(source)); |
1807 } | 1859 } |
1808 } | 1860 } |
1809 if (retained[dartx.length] != source[dartx.length]) { | 1861 if (retained[dartx.length] != source[dartx.length]) { |
1810 source[dartx.setRange](0, retained[dartx.length], retained); | 1862 source[dartx.setRange](0, retained[dartx.length], retained); |
1811 source[dartx.length] = retained[dartx.length]; | 1863 source[dartx.length] = retained[dartx.length]; |
1812 } | 1864 } |
1813 } | 1865 } |
1814 clear() { | 1866 [dartx.clear]() { |
1815 this.length = 0; | 1867 this[dartx.length] = 0; |
1816 } | 1868 } |
1817 removeLast() { | 1869 [dartx.removeLast]() { |
1818 if (this[dartx.length] == 0) { | 1870 if (this[dartx.length] == 0) { |
1819 dart.throw(_internal.IterableElementError.noElement()); | 1871 dart.throw(_internal.IterableElementError.noElement()); |
1820 } | 1872 } |
1821 let result = this.get(dart.notNull(this[dartx.length]) - 1); | 1873 let result = this[dartx.get](dart.notNull(this[dartx.length]) - 1); |
1822 this[dartx.length] = dart.notNull(this[dartx.length]) - 1; | 1874 this[dartx.length] = dart.notNull(this[dartx.length]) - 1; |
1823 return result; | 1875 return result; |
1824 } | 1876 } |
1825 sort(compare) { | 1877 [dartx.sort](compare) { |
1826 if (compare === void 0) compare = null; | 1878 if (compare === void 0) compare = null; |
1827 dart.as(compare, dart.functionType(core.int, [E, E])); | 1879 dart.as(compare, dart.functionType(core.int, [E, E])); |
1828 _internal.Sort.sort(this, dart.as(compare == null ? core.Comparable.comp
are : compare, __CastType0)); | 1880 _internal.Sort.sort(this, dart.as(compare == null ? core.Comparable.comp
are : compare, __CastType0)); |
1829 } | 1881 } |
1830 shuffle(random) { | 1882 [dartx.shuffle](random) { |
1831 if (random === void 0) random = null; | 1883 if (random === void 0) random = null; |
1832 if (random == null) random = math.Random.new(); | 1884 if (random == null) random = math.Random.new(); |
1833 let length = this.length; | 1885 let length = this[dartx.length]; |
1834 while (dart.notNull(length) > 1) { | 1886 while (dart.notNull(length) > 1) { |
1835 let pos = random.nextInt(length); | 1887 let pos = random.nextInt(length); |
1836 length = dart.notNull(length) - 1; | 1888 length = dart.notNull(length) - 1; |
1837 let tmp = this.get(length); | 1889 let tmp = this[dartx.get](length); |
1838 this.set(length, this.get(pos)); | 1890 this[dartx.set](length, this[dartx.get](pos)); |
1839 this.set(pos, tmp); | 1891 this[dartx.set](pos, tmp); |
1840 } | 1892 } |
1841 } | 1893 } |
1842 asMap() { | 1894 [dartx.asMap]() { |
1843 return new (_internal.ListMapView$(E))(this); | 1895 return new (_internal.ListMapView$(E))(this); |
1844 } | 1896 } |
1845 sublist(start, end) { | 1897 [dartx.sublist](start, end) { |
1846 if (end === void 0) end = null; | 1898 if (end === void 0) end = null; |
1847 let listLength = this.length; | 1899 let listLength = this[dartx.length]; |
1848 if (end == null) end = listLength; | 1900 if (end == null) end = listLength; |
1849 core.RangeError.checkValidRange(start, end, listLength); | 1901 core.RangeError.checkValidRange(start, end, listLength); |
1850 let length = dart.notNull(end) - dart.notNull(start); | 1902 let length = dart.notNull(end) - dart.notNull(start); |
1851 let result = core.List$(E).new(); | 1903 let result = core.List$(E).new(); |
1852 result[dartx.length] = length; | 1904 result[dartx.length] = length; |
1853 for (let i = 0; i < length; i++) { | 1905 for (let i = 0; i < length; i++) { |
1854 result[dartx.set](i, this.get(dart.notNull(start) + i)); | 1906 result[dartx.set](i, this[dartx.get](dart.notNull(start) + i)); |
1855 } | 1907 } |
1856 return result; | 1908 return result; |
1857 } | 1909 } |
1858 getRange(start, end) { | 1910 [dartx.getRange](start, end) { |
1859 core.RangeError.checkValidRange(start, end, this.length); | 1911 core.RangeError.checkValidRange(start, end, this[dartx.length]); |
1860 return new (_internal.SubListIterable$(E))(this, start, end); | 1912 return new (_internal.SubListIterable$(E))(this, start, end); |
1861 } | 1913 } |
1862 removeRange(start, end) { | 1914 [dartx.removeRange](start, end) { |
1863 core.RangeError.checkValidRange(start, end, this.length); | 1915 core.RangeError.checkValidRange(start, end, this[dartx.length]); |
1864 let length = dart.notNull(end) - dart.notNull(start); | 1916 let length = dart.notNull(end) - dart.notNull(start); |
1865 this.setRange(start, dart.notNull(this.length) - length, this, end); | 1917 this[dartx.setRange](start, dart.notNull(this[dartx.length]) - length, t
his, end); |
1866 this.length = dart.notNull(this.length) - length; | 1918 this[dartx.length] = dart.notNull(this[dartx.length]) - length; |
1867 } | 1919 } |
1868 fillRange(start, end, fill) { | 1920 [dartx.fillRange](start, end, fill) { |
1869 if (fill === void 0) fill = null; | 1921 if (fill === void 0) fill = null; |
1870 dart.as(fill, E); | 1922 dart.as(fill, E); |
1871 core.RangeError.checkValidRange(start, end, this.length); | 1923 core.RangeError.checkValidRange(start, end, this[dartx.length]); |
1872 for (let i = start; dart.notNull(i) < dart.notNull(end); i = dart.notNul
l(i) + 1) { | 1924 for (let i = start; dart.notNull(i) < dart.notNull(end); i = dart.notNul
l(i) + 1) { |
1873 this.set(i, fill); | 1925 this[dartx.set](i, fill); |
1874 } | 1926 } |
1875 } | 1927 } |
1876 setRange(start, end, iterable, skipCount) { | 1928 [dartx.setRange](start, end, iterable, skipCount) { |
1877 dart.as(iterable, core.Iterable$(E)); | 1929 dart.as(iterable, core.Iterable$(E)); |
1878 if (skipCount === void 0) skipCount = 0; | 1930 if (skipCount === void 0) skipCount = 0; |
1879 core.RangeError.checkValidRange(start, end, this.length); | 1931 core.RangeError.checkValidRange(start, end, this[dartx.length]); |
1880 let length = dart.notNull(end) - dart.notNull(start); | 1932 let length = dart.notNull(end) - dart.notNull(start); |
1881 if (length == 0) return; | 1933 if (length == 0) return; |
1882 core.RangeError.checkNotNegative(skipCount, "skipCount"); | 1934 core.RangeError.checkNotNegative(skipCount, "skipCount"); |
1883 let otherList = null; | 1935 let otherList = null; |
1884 let otherStart = null; | 1936 let otherStart = null; |
1885 if (dart.is(iterable, core.List)) { | 1937 if (dart.is(iterable, core.List)) { |
1886 otherList = dart.as(iterable, core.List); | 1938 otherList = dart.as(iterable, core.List); |
1887 otherStart = skipCount; | 1939 otherStart = skipCount; |
1888 } else { | 1940 } else { |
1889 otherList = iterable[dartx.skip](skipCount)[dartx.toList]({growable: f
alse}); | 1941 otherList = iterable[dartx.skip](skipCount)[dartx.toList]({growable: f
alse}); |
1890 otherStart = 0; | 1942 otherStart = 0; |
1891 } | 1943 } |
1892 if (dart.notNull(otherStart) + length > dart.notNull(otherList[dartx.len
gth])) { | 1944 if (dart.notNull(otherStart) + length > dart.notNull(otherList[dartx.len
gth])) { |
1893 dart.throw(_internal.IterableElementError.tooFew()); | 1945 dart.throw(_internal.IterableElementError.tooFew()); |
1894 } | 1946 } |
1895 if (dart.notNull(otherStart) < dart.notNull(start)) { | 1947 if (dart.notNull(otherStart) < dart.notNull(start)) { |
1896 for (let i = length - 1; i >= 0; i--) { | 1948 for (let i = length - 1; i >= 0; i--) { |
1897 this.set(dart.notNull(start) + i, dart.as(otherList[dartx.get](dart.
notNull(otherStart) + i), E)); | 1949 this[dartx.set](dart.notNull(start) + i, dart.as(otherList[dartx.get
](dart.notNull(otherStart) + i), E)); |
1898 } | 1950 } |
1899 } else { | 1951 } else { |
1900 for (let i = 0; i < length; i++) { | 1952 for (let i = 0; i < length; i++) { |
1901 this.set(dart.notNull(start) + i, dart.as(otherList[dartx.get](dart.
notNull(otherStart) + i), E)); | 1953 this[dartx.set](dart.notNull(start) + i, dart.as(otherList[dartx.get
](dart.notNull(otherStart) + i), E)); |
1902 } | 1954 } |
1903 } | 1955 } |
1904 } | 1956 } |
1905 replaceRange(start, end, newContents) { | 1957 [dartx.replaceRange](start, end, newContents) { |
1906 dart.as(newContents, core.Iterable$(E)); | 1958 dart.as(newContents, core.Iterable$(E)); |
1907 core.RangeError.checkValidRange(start, end, this.length); | 1959 core.RangeError.checkValidRange(start, end, this[dartx.length]); |
1908 if (!dart.is(newContents, _internal.EfficientLength)) { | 1960 if (!dart.is(newContents, _internal.EfficientLength)) { |
1909 newContents = newContents[dartx.toList](); | 1961 newContents = newContents[dartx.toList](); |
1910 } | 1962 } |
1911 let removeLength = dart.notNull(end) - dart.notNull(start); | 1963 let removeLength = dart.notNull(end) - dart.notNull(start); |
1912 let insertLength = newContents[dartx.length]; | 1964 let insertLength = newContents[dartx.length]; |
1913 if (removeLength >= dart.notNull(insertLength)) { | 1965 if (removeLength >= dart.notNull(insertLength)) { |
1914 let delta = removeLength - dart.notNull(insertLength); | 1966 let delta = removeLength - dart.notNull(insertLength); |
1915 let insertEnd = dart.notNull(start) + dart.notNull(insertLength); | 1967 let insertEnd = dart.notNull(start) + dart.notNull(insertLength); |
1916 let newLength = dart.notNull(this.length) - delta; | 1968 let newLength = dart.notNull(this[dartx.length]) - delta; |
1917 this.setRange(start, insertEnd, newContents); | 1969 this[dartx.setRange](start, insertEnd, newContents); |
1918 if (delta != 0) { | 1970 if (delta != 0) { |
1919 this.setRange(insertEnd, newLength, this, end); | 1971 this[dartx.setRange](insertEnd, newLength, this, end); |
1920 this.length = newLength; | 1972 this[dartx.length] = newLength; |
1921 } | 1973 } |
1922 } else { | 1974 } else { |
1923 let delta = dart.notNull(insertLength) - removeLength; | 1975 let delta = dart.notNull(insertLength) - removeLength; |
1924 let newLength = dart.notNull(this.length) + delta; | 1976 let newLength = dart.notNull(this[dartx.length]) + delta; |
1925 let insertEnd = dart.notNull(start) + dart.notNull(insertLength); | 1977 let insertEnd = dart.notNull(start) + dart.notNull(insertLength); |
1926 this.length = newLength; | 1978 this[dartx.length] = newLength; |
1927 this.setRange(insertEnd, newLength, this, end); | 1979 this[dartx.setRange](insertEnd, newLength, this, end); |
1928 this.setRange(start, insertEnd, newContents); | 1980 this[dartx.setRange](start, insertEnd, newContents); |
1929 } | 1981 } |
1930 } | 1982 } |
1931 indexOf(element, startIndex) { | 1983 [dartx.indexOf](element, startIndex) { |
1932 if (startIndex === void 0) startIndex = 0; | 1984 if (startIndex === void 0) startIndex = 0; |
1933 if (dart.notNull(startIndex) >= dart.notNull(this.length)) { | 1985 if (dart.notNull(startIndex) >= dart.notNull(this[dartx.length])) { |
1934 return -1; | 1986 return -1; |
1935 } | 1987 } |
1936 if (dart.notNull(startIndex) < 0) { | 1988 if (dart.notNull(startIndex) < 0) { |
1937 startIndex = 0; | 1989 startIndex = 0; |
1938 } | 1990 } |
1939 for (let i = startIndex; dart.notNull(i) < dart.notNull(this.length); i
= dart.notNull(i) + 1) { | 1991 for (let i = startIndex; dart.notNull(i) < dart.notNull(this[dartx.lengt
h]); i = dart.notNull(i) + 1) { |
1940 if (dart.equals(this.get(i), element)) { | 1992 if (dart.equals(this[dartx.get](i), element)) { |
1941 return i; | 1993 return i; |
1942 } | 1994 } |
1943 } | 1995 } |
1944 return -1; | 1996 return -1; |
1945 } | 1997 } |
1946 lastIndexOf(element, startIndex) { | 1998 [dartx.lastIndexOf](element, startIndex) { |
1947 if (startIndex === void 0) startIndex = null; | 1999 if (startIndex === void 0) startIndex = null; |
1948 if (startIndex == null) { | 2000 if (startIndex == null) { |
1949 startIndex = dart.notNull(this.length) - 1; | 2001 startIndex = dart.notNull(this[dartx.length]) - 1; |
1950 } else { | 2002 } else { |
1951 if (dart.notNull(startIndex) < 0) { | 2003 if (dart.notNull(startIndex) < 0) { |
1952 return -1; | 2004 return -1; |
1953 } | 2005 } |
1954 if (dart.notNull(startIndex) >= dart.notNull(this.length)) { | 2006 if (dart.notNull(startIndex) >= dart.notNull(this[dartx.length])) { |
1955 startIndex = dart.notNull(this.length) - 1; | 2007 startIndex = dart.notNull(this[dartx.length]) - 1; |
1956 } | 2008 } |
1957 } | 2009 } |
1958 for (let i = startIndex; dart.notNull(i) >= 0; i = dart.notNull(i) - 1)
{ | 2010 for (let i = startIndex; dart.notNull(i) >= 0; i = dart.notNull(i) - 1)
{ |
1959 if (dart.equals(this.get(i), element)) { | 2011 if (dart.equals(this[dartx.get](i), element)) { |
1960 return i; | 2012 return i; |
1961 } | 2013 } |
1962 } | 2014 } |
1963 return -1; | 2015 return -1; |
1964 } | 2016 } |
1965 insert(index, element) { | 2017 [dartx.insert](index, element) { |
1966 dart.as(element, E); | 2018 dart.as(element, E); |
1967 core.RangeError.checkValueInInterval(index, 0, this[dartx.length], "inde
x"); | 2019 core.RangeError.checkValueInInterval(index, 0, this[dartx.length], "inde
x"); |
1968 if (index == this.length) { | 2020 if (index == this[dartx.length]) { |
1969 this.add(element); | 2021 this[dartx.add](element); |
1970 return; | 2022 return; |
1971 } | 2023 } |
1972 if (!(typeof index == 'number')) dart.throw(new core.ArgumentError(index
)); | 2024 if (!(typeof index == 'number')) dart.throw(new core.ArgumentError(index
)); |
1973 this.length = dart.notNull(this.length) + 1; | 2025 this[dartx.length] = dart.notNull(this[dartx.length]) + 1; |
1974 this.setRange(dart.notNull(index) + 1, this.length, this, index); | 2026 this[dartx.setRange](dart.notNull(index) + 1, this[dartx.length], this,
index); |
1975 this.set(index, element); | 2027 this[dartx.set](index, element); |
1976 } | 2028 } |
1977 removeAt(index) { | 2029 [dartx.removeAt](index) { |
1978 let result = this.get(index); | 2030 let result = this[dartx.get](index); |
1979 this.setRange(index, dart.notNull(this.length) - 1, this, dart.notNull(i
ndex) + 1); | 2031 this[dartx.setRange](index, dart.notNull(this[dartx.length]) - 1, this,
dart.notNull(index) + 1); |
1980 this[dartx.length] = dart.notNull(this[dartx.length]) - 1; | 2032 this[dartx.length] = dart.notNull(this[dartx.length]) - 1; |
1981 return result; | 2033 return result; |
1982 } | 2034 } |
1983 insertAll(index, iterable) { | 2035 [dartx.insertAll](index, iterable) { |
1984 dart.as(iterable, core.Iterable$(E)); | 2036 dart.as(iterable, core.Iterable$(E)); |
1985 core.RangeError.checkValueInInterval(index, 0, this[dartx.length], "inde
x"); | 2037 core.RangeError.checkValueInInterval(index, 0, this[dartx.length], "inde
x"); |
1986 if (dart.is(iterable, _internal.EfficientLength)) { | 2038 if (dart.is(iterable, _internal.EfficientLength)) { |
1987 iterable = iterable[dartx.toList](); | 2039 iterable = iterable[dartx.toList](); |
1988 } | 2040 } |
1989 let insertionLength = iterable[dartx.length]; | 2041 let insertionLength = iterable[dartx.length]; |
1990 this.length = dart.notNull(this.length) + dart.notNull(insertionLength); | 2042 this[dartx.length] = dart.notNull(this[dartx.length]) + dart.notNull(ins
ertionLength); |
1991 this.setRange(dart.notNull(index) + dart.notNull(insertionLength), this.
length, this, index); | 2043 this[dartx.setRange](dart.notNull(index) + dart.notNull(insertionLength)
, this[dartx.length], this, index); |
1992 this.setAll(index, iterable); | 2044 this[dartx.setAll](index, iterable); |
1993 } | 2045 } |
1994 setAll(index, iterable) { | 2046 [dartx.setAll](index, iterable) { |
1995 dart.as(iterable, core.Iterable$(E)); | 2047 dart.as(iterable, core.Iterable$(E)); |
1996 if (dart.is(iterable, core.List)) { | 2048 if (dart.is(iterable, core.List)) { |
1997 this.setRange(index, dart.notNull(index) + dart.notNull(iterable[dartx
.length]), iterable); | 2049 this[dartx.setRange](index, dart.notNull(index) + dart.notNull(iterabl
e[dartx.length]), iterable); |
1998 } else { | 2050 } else { |
1999 for (let element of iterable) { | 2051 for (let element of iterable) { |
2000 this.set((() => { | 2052 this[dartx.set]((() => { |
2001 let x = index; | 2053 let x = index; |
2002 index = dart.notNull(x) + 1; | 2054 index = dart.notNull(x) + 1; |
2003 return x; | 2055 return x; |
2004 })(), element); | 2056 })(), element); |
2005 } | 2057 } |
2006 } | 2058 } |
2007 } | 2059 } |
2008 get reversed() { | 2060 get [dartx.reversed]() { |
2009 return new (_internal.ReversedListIterable$(E))(this); | 2061 return new (_internal.ReversedListIterable$(E))(this); |
2010 } | 2062 } |
2011 toString() { | 2063 toString() { |
2012 return IterableBase.iterableToFullString(this, '[', ']'); | 2064 return IterableBase.iterableToFullString(this, '[', ']'); |
2013 } | 2065 } |
2014 } | 2066 } |
2015 ListMixin[dart.implements] = () => [core.List$(E)]; | 2067 ListMixin[dart.implements] = () => [core.List$(E)]; |
2016 dart.setSignature(ListMixin, { | 2068 dart.setSignature(ListMixin, { |
2017 methods: () => ({ | 2069 methods: () => ({ |
2018 elementAt: [E, [core.int]], | 2070 [dartx.elementAt]: [E, [core.int]], |
2019 forEach: [dart.void, [dart.functionType(dart.void, [E])]], | 2071 [dartx.forEach]: [dart.void, [dart.functionType(dart.void, [E])]], |
2020 contains: [core.bool, [core.Object]], | 2072 [dartx.contains]: [core.bool, [core.Object]], |
2021 every: [core.bool, [dart.functionType(core.bool, [E])]], | 2073 [dartx.every]: [core.bool, [dart.functionType(core.bool, [E])]], |
2022 any: [core.bool, [dart.functionType(core.bool, [E])]], | 2074 [dartx.any]: [core.bool, [dart.functionType(core.bool, [E])]], |
2023 firstWhere: [E, [dart.functionType(core.bool, [E])], {orElse: dart.funct
ionType(E, [])}], | 2075 [dartx.firstWhere]: [E, [dart.functionType(core.bool, [E])], {orElse: da
rt.functionType(E, [])}], |
2024 lastWhere: [E, [dart.functionType(core.bool, [E])], {orElse: dart.functi
onType(E, [])}], | 2076 [dartx.lastWhere]: [E, [dart.functionType(core.bool, [E])], {orElse: dar
t.functionType(E, [])}], |
2025 singleWhere: [E, [dart.functionType(core.bool, [E])]], | 2077 [dartx.singleWhere]: [E, [dart.functionType(core.bool, [E])]], |
2026 join: [core.String, [], [core.String]], | 2078 [dartx.join]: [core.String, [], [core.String]], |
2027 where: [core.Iterable$(E), [dart.functionType(core.bool, [E])]], | 2079 [dartx.where]: [core.Iterable$(E), [dart.functionType(core.bool, [E])]], |
2028 map: [core.Iterable, [dart.functionType(dart.dynamic, [E])]], | 2080 [dartx.map]: [core.Iterable, [dart.functionType(dart.dynamic, [E])]], |
2029 expand: [core.Iterable, [dart.functionType(core.Iterable, [E])]], | 2081 [dartx.expand]: [core.Iterable, [dart.functionType(core.Iterable, [E])]]
, |
2030 reduce: [E, [dart.functionType(E, [E, E])]], | 2082 [dartx.reduce]: [E, [dart.functionType(E, [E, E])]], |
2031 fold: [dart.dynamic, [dart.dynamic, dart.functionType(dart.dynamic, [dar
t.dynamic, E])]], | 2083 [dartx.fold]: [dart.dynamic, [dart.dynamic, dart.functionType(dart.dynam
ic, [dart.dynamic, E])]], |
2032 skip: [core.Iterable$(E), [core.int]], | 2084 [dartx.skip]: [core.Iterable$(E), [core.int]], |
2033 skipWhile: [core.Iterable$(E), [dart.functionType(core.bool, [E])]], | 2085 [dartx.skipWhile]: [core.Iterable$(E), [dart.functionType(core.bool, [E]
)]], |
2034 take: [core.Iterable$(E), [core.int]], | 2086 [dartx.take]: [core.Iterable$(E), [core.int]], |
2035 takeWhile: [core.Iterable$(E), [dart.functionType(core.bool, [E])]], | 2087 [dartx.takeWhile]: [core.Iterable$(E), [dart.functionType(core.bool, [E]
)]], |
2036 toList: [core.List$(E), [], {growable: core.bool}], | 2088 [dartx.toList]: [core.List$(E), [], {growable: core.bool}], |
2037 toSet: [core.Set$(E), []], | 2089 [dartx.toSet]: [core.Set$(E), []], |
2038 add: [dart.void, [E]], | 2090 [dartx.add]: [dart.void, [E]], |
2039 addAll: [dart.void, [core.Iterable$(E)]], | 2091 [dartx.addAll]: [dart.void, [core.Iterable$(E)]], |
2040 remove: [core.bool, [core.Object]], | 2092 [dartx.remove]: [core.bool, [core.Object]], |
2041 removeWhere: [dart.void, [dart.functionType(core.bool, [E])]], | 2093 [dartx.removeWhere]: [dart.void, [dart.functionType(core.bool, [E])]], |
2042 retainWhere: [dart.void, [dart.functionType(core.bool, [E])]], | 2094 [dartx.retainWhere]: [dart.void, [dart.functionType(core.bool, [E])]], |
2043 clear: [dart.void, []], | 2095 [dartx.clear]: [dart.void, []], |
2044 removeLast: [E, []], | 2096 [dartx.removeLast]: [E, []], |
2045 sort: [dart.void, [], [dart.functionType(core.int, [E, E])]], | 2097 [dartx.sort]: [dart.void, [], [dart.functionType(core.int, [E, E])]], |
2046 shuffle: [dart.void, [], [math.Random]], | 2098 [dartx.shuffle]: [dart.void, [], [math.Random]], |
2047 asMap: [core.Map$(core.int, E), []], | 2099 [dartx.asMap]: [core.Map$(core.int, E), []], |
2048 sublist: [core.List$(E), [core.int], [core.int]], | 2100 [dartx.sublist]: [core.List$(E), [core.int], [core.int]], |
2049 getRange: [core.Iterable$(E), [core.int, core.int]], | 2101 [dartx.getRange]: [core.Iterable$(E), [core.int, core.int]], |
2050 removeRange: [dart.void, [core.int, core.int]], | 2102 [dartx.removeRange]: [dart.void, [core.int, core.int]], |
2051 fillRange: [dart.void, [core.int, core.int], [E]], | 2103 [dartx.fillRange]: [dart.void, [core.int, core.int], [E]], |
2052 setRange: [dart.void, [core.int, core.int, core.Iterable$(E)], [core.int
]], | 2104 [dartx.setRange]: [dart.void, [core.int, core.int, core.Iterable$(E)], [
core.int]], |
2053 replaceRange: [dart.void, [core.int, core.int, core.Iterable$(E)]], | 2105 [dartx.replaceRange]: [dart.void, [core.int, core.int, core.Iterable$(E)
]], |
2054 indexOf: [core.int, [core.Object], [core.int]], | 2106 [dartx.indexOf]: [core.int, [core.Object], [core.int]], |
2055 lastIndexOf: [core.int, [core.Object], [core.int]], | 2107 [dartx.lastIndexOf]: [core.int, [core.Object], [core.int]], |
2056 insert: [dart.void, [core.int, E]], | 2108 [dartx.insert]: [dart.void, [core.int, E]], |
2057 removeAt: [E, [core.int]], | 2109 [dartx.removeAt]: [E, [core.int]], |
2058 insertAll: [dart.void, [core.int, core.Iterable$(E)]], | 2110 [dartx.insertAll]: [dart.void, [core.int, core.Iterable$(E)]], |
2059 setAll: [dart.void, [core.int, core.Iterable$(E)]] | 2111 [dartx.setAll]: [dart.void, [core.int, core.Iterable$(E)]] |
2060 }), | 2112 }), |
2061 statics: () => ({_filter: [dart.void, [core.List, dart.functionType(core.b
ool, [dart.dynamic]), core.bool]]}), | 2113 statics: () => ({_filter: [dart.void, [core.List, dart.functionType(core.b
ool, [dart.dynamic]), core.bool]]}), |
2062 names: ['_filter'] | 2114 names: ['_filter'] |
2063 }); | 2115 }); |
2064 dart.defineExtensionMembers(ListMixin, [ | |
2065 'elementAt', | |
2066 'forEach', | |
2067 'contains', | |
2068 'every', | |
2069 'any', | |
2070 'firstWhere', | |
2071 'lastWhere', | |
2072 'singleWhere', | |
2073 'join', | |
2074 'where', | |
2075 'map', | |
2076 'expand', | |
2077 'reduce', | |
2078 'fold', | |
2079 'skip', | |
2080 'skipWhile', | |
2081 'take', | |
2082 'takeWhile', | |
2083 'toList', | |
2084 'toSet', | |
2085 'add', | |
2086 'addAll', | |
2087 'remove', | |
2088 'removeWhere', | |
2089 'retainWhere', | |
2090 'clear', | |
2091 'removeLast', | |
2092 'sort', | |
2093 'shuffle', | |
2094 'asMap', | |
2095 'sublist', | |
2096 'getRange', | |
2097 'removeRange', | |
2098 'fillRange', | |
2099 'setRange', | |
2100 'replaceRange', | |
2101 'indexOf', | |
2102 'lastIndexOf', | |
2103 'insert', | |
2104 'removeAt', | |
2105 'insertAll', | |
2106 'setAll', | |
2107 'iterator', | |
2108 'isEmpty', | |
2109 'isNotEmpty', | |
2110 'first', | |
2111 'last', | |
2112 'single', | |
2113 'reversed' | |
2114 ]); | |
2115 return ListMixin; | 2116 return ListMixin; |
2116 }); | 2117 }); |
2117 let ListMixin = ListMixin$(); | 2118 let ListMixin = ListMixin$(); |
2118 const ListBase$ = dart.generic(function(E) { | 2119 const ListBase$ = dart.generic(function(E) { |
2119 class ListBase extends dart.mixin(core.Object, ListMixin$(E)) { | 2120 class ListBase extends dart.mixin(core.Object, ListMixin$(E)) { |
2120 static listToString(list) { | 2121 static listToString(list) { |
2121 return IterableBase.iterableToFullString(list, '[', ']'); | 2122 return IterableBase.iterableToFullString(list, '[', ']'); |
2122 } | 2123 } |
2123 } | 2124 } |
2124 dart.setSignature(ListBase, { | 2125 dart.setSignature(ListBase, { |
(...skipping 3655 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5780 exports.LinkedHashMapKeyIterable$ = LinkedHashMapKeyIterable$; | 5781 exports.LinkedHashMapKeyIterable$ = LinkedHashMapKeyIterable$; |
5781 exports.LinkedHashMapKeyIterable = LinkedHashMapKeyIterable; | 5782 exports.LinkedHashMapKeyIterable = LinkedHashMapKeyIterable; |
5782 exports.LinkedHashMapKeyIterator$ = LinkedHashMapKeyIterator$; | 5783 exports.LinkedHashMapKeyIterator$ = LinkedHashMapKeyIterator$; |
5783 exports.LinkedHashMapKeyIterator = LinkedHashMapKeyIterator; | 5784 exports.LinkedHashMapKeyIterator = LinkedHashMapKeyIterator; |
5784 exports.HashSetIterator$ = HashSetIterator$; | 5785 exports.HashSetIterator$ = HashSetIterator$; |
5785 exports.HashSetIterator = HashSetIterator; | 5786 exports.HashSetIterator = HashSetIterator; |
5786 exports.LinkedHashSetCell = LinkedHashSetCell; | 5787 exports.LinkedHashSetCell = LinkedHashSetCell; |
5787 exports.LinkedHashSetIterator$ = LinkedHashSetIterator$; | 5788 exports.LinkedHashSetIterator$ = LinkedHashSetIterator$; |
5788 exports.LinkedHashSetIterator = LinkedHashSetIterator; | 5789 exports.LinkedHashSetIterator = LinkedHashSetIterator; |
5789 }); | 5790 }); |
OLD | NEW |