Mercurial > projects > dwt-addons
comparison dwtx/dwtxhelper/Collection.d @ 116:1c497c6c0ad8
Collection impl
author | Frank Benoit <benoit@tionex.de> |
---|---|
date | Fri, 08 Aug 2008 15:12:30 +0200 |
parents | efda8ce1120b |
children | 35f1d208f3c3 |
comparison
equal
deleted
inserted
replaced
115:ae94c50641a0 | 116:1c497c6c0ad8 |
---|---|
1605 Object firstElement(){ | 1605 Object firstElement(){ |
1606 implMissing( __FILE__, __LINE__ ); | 1606 implMissing( __FILE__, __LINE__ ); |
1607 return null; | 1607 return null; |
1608 } | 1608 } |
1609 Object get(int index){ | 1609 Object get(int index){ |
1610 implMissing( __FILE__, __LINE__ ); | 1610 return list.get(index); |
1611 return null; | |
1612 } | 1611 } |
1613 hash_t toHash(){ | 1612 hash_t toHash(){ |
1614 implMissing( __FILE__, __LINE__ ); | 1613 implMissing( __FILE__, __LINE__ ); |
1615 return 0; | 1614 return 0; |
1616 } | 1615 } |
1624 } | 1623 } |
1625 void insertElementAt(Object obj, int index){ | 1624 void insertElementAt(Object obj, int index){ |
1626 implMissing( __FILE__, __LINE__ ); | 1625 implMissing( __FILE__, __LINE__ ); |
1627 } | 1626 } |
1628 bool isEmpty(){ | 1627 bool isEmpty(){ |
1629 implMissing( __FILE__, __LINE__ ); | 1628 return list.isEmpty(); |
1630 return false; | |
1631 } | 1629 } |
1632 Iterator iterator(){ | 1630 Iterator iterator(){ |
1633 implMissing( __FILE__, __LINE__ ); | 1631 implMissing( __FILE__, __LINE__ ); |
1634 return null; | 1632 return null; |
1635 } | 1633 } |
1656 Object remove(int index){ | 1654 Object remove(int index){ |
1657 implMissing( __FILE__, __LINE__ ); | 1655 implMissing( __FILE__, __LINE__ ); |
1658 return null; | 1656 return null; |
1659 } | 1657 } |
1660 bool remove(Object o){ | 1658 bool remove(Object o){ |
1661 implMissing( __FILE__, __LINE__ ); | 1659 return list.remove(o,false) !is 0; |
1662 return false; | |
1663 } | 1660 } |
1664 public bool remove(String key){ | 1661 public bool remove(String key){ |
1665 return remove(stringcast(key)); | 1662 return remove(stringcast(key)); |
1666 } | 1663 } |
1667 bool removeAll(Collection c){ | 1664 bool removeAll(Collection c){ |
1668 implMissing( __FILE__, __LINE__ ); | 1665 bool res = false; |
1669 return false; | 1666 foreach( o; c){ |
1667 res |= list.remove(o,false) !is 0; | |
1668 } | |
1669 return res; | |
1670 } | 1670 } |
1671 void removeAllElements(){ | 1671 void removeAllElements(){ |
1672 implMissing( __FILE__, __LINE__ ); | 1672 implMissing( __FILE__, __LINE__ ); |
1673 } | 1673 } |
1674 Object removeFirst(){ | 1674 Object removeFirst(){ |