changeset 116:1c497c6c0ad8

Collection impl
author Frank Benoit <benoit@tionex.de>
date Fri, 08 Aug 2008 15:12:30 +0200
parents ae94c50641a0
children bade933d6ef6
files dwtx/dwtxhelper/Collection.d
diffstat 1 files changed, 8 insertions(+), 8 deletions(-) [+]
line wrap: on
line diff
--- a/dwtx/dwtxhelper/Collection.d	Fri Aug 08 11:26:13 2008 +0200
+++ b/dwtx/dwtxhelper/Collection.d	Fri Aug 08 15:12:30 2008 +0200
@@ -1607,8 +1607,7 @@
         return null;
     }
     Object     get(int index){
-        implMissing( __FILE__, __LINE__ );
-        return null;
+        return list.get(index);
     }
     hash_t    toHash(){
         implMissing( __FILE__, __LINE__ );
@@ -1626,8 +1625,7 @@
         implMissing( __FILE__, __LINE__ );
     }
     bool    isEmpty(){
-        implMissing( __FILE__, __LINE__ );
-        return false;
+        return list.isEmpty();
     }
     Iterator   iterator(){
         implMissing( __FILE__, __LINE__ );
@@ -1658,15 +1656,17 @@
         return null;
     }
     bool    remove(Object o){
-        implMissing( __FILE__, __LINE__ );
-        return false;
+        return list.remove(o,false) !is 0;
     }
     public bool remove(String key){
         return remove(stringcast(key));
     }
     bool    removeAll(Collection c){
-        implMissing( __FILE__, __LINE__ );
-        return false;
+        bool res = false;
+        foreach( o; c){
+            res |= list.remove(o,false) !is 0;
+        }
+        return res;
     }
     void   removeAllElements(){
         implMissing( __FILE__, __LINE__ );