Mercurial > projects > dwt2
diff base/src/java/util/ArrayList.d @ 84:fcf926c91ca4
Added base classes
author | Frank Benoit <benoit@tionex.de> |
---|---|
date | Sat, 18 Apr 2009 09:25:29 +0200 |
parents | 1bf55a6eb092 |
children | e944a4cf537b |
line wrap: on
line diff
--- a/base/src/java/util/ArrayList.d Tue Apr 14 13:22:56 2009 +0200 +++ b/base/src/java/util/ArrayList.d Sat Apr 18 09:25:29 2009 +0200 @@ -172,7 +172,7 @@ public void add(Object o){ implMissing( __FILE__, __LINE__ ); } - public bool add(String o){ + public void add(String o){ implMissing( __FILE__, __LINE__ ); return false; } @@ -266,6 +266,22 @@ } return a; } + String[] toArray(String[] a){ + version(Tango){ + auto res = a; + if( res.length < data.length ){ + res.length = data.length; + } + int idx = 0; + foreach( o; data ){ + res[idx] = stringcast(o); + } + return res; + } else { // Phobos + implMissing( __FILE__, __LINE__ ); + return null; + } + } // only for D public int opApply (int delegate(ref Object value) dg){ @@ -275,5 +291,8 @@ } return 0; } + public String toString(){ + return super.toString(); + } }