Mercurial > projects > dwt2
diff base/src/java/util/Collections.d @ 84:fcf926c91ca4
Added base classes
author | Frank Benoit <benoit@tionex.de> |
---|---|
date | Sat, 18 Apr 2009 09:25:29 +0200 |
parents | 1bf55a6eb092 |
children | bbe49769ec18 |
line wrap: on
line diff
--- a/base/src/java/util/Collections.d Tue Apr 14 13:22:56 2009 +0200 +++ b/base/src/java/util/Collections.d Sat Apr 18 09:25:29 2009 +0200 @@ -73,7 +73,7 @@ public void add(Object o){ unsupported(); } - public bool add(String o){ + public void add(String o){ unsupported(); return false; // make compiler happy } @@ -202,6 +202,9 @@ public Object[] toArray(Object[] a){ return list.toArray(a); } + public String[] toArray(String[] a){ + return list.toArray(a); + } public int opApply (int delegate(ref Object value) dg){ implMissing(__FILE__, __LINE__ ); return 0; @@ -210,6 +213,9 @@ implMissing(__FILE__, __LINE__ ); return 0; } + public String toString(){ + return list.toString(); + } } static int binarySearch(List list, Object key){ implMissing( __FILE__, __LINE__ ); @@ -230,6 +236,10 @@ implMissing( __FILE__, __LINE__ ); return null; } + public static List singletonList( Object o ){ + implMissing( __FILE__, __LINE__ ); + return null; + } public static Set singleton( Object o ){ TreeSet res = new TreeSet(); res.add(o); @@ -280,6 +290,8 @@ public List subList(int fromIndex, int toIndex){ synchronized(this){ return this.list.subList(fromIndex,toIndex); } } public Object[] toArray(){ synchronized(this){ return this.list.toArray(); } } public Object[] toArray(Object[] a){ synchronized(this){ return this.list.toArray(a); } } + public String[] toArray(String[] a){ synchronized(this){ return this.list.toArray(a); } } + public String toString(){ synchronized(this){ return this.list.toString(); } } } static List synchronizedList(List list){ return new SynchronizedList(list);