Mercurial > projects > dwt-addons
diff dwtx/jface/viewers/deferred/LazySortedCollection.d @ 104:04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
These new wrappers now use the tango.util.containers instead of the tango.util.collections.
author | Frank Benoit <benoit@tionex.de> |
---|---|
date | Thu, 07 Aug 2008 15:01:33 +0200 |
parents | b6c35faf97c8 |
children |
line wrap: on
line diff
--- a/dwtx/jface/viewers/deferred/LazySortedCollection.d Sun Aug 03 17:01:51 2008 +0200 +++ b/dwtx/jface/viewers/deferred/LazySortedCollection.d Thu Aug 07 15:01:33 2008 +0200 @@ -17,11 +17,11 @@ // import java.util.Collection; // import java.util.Comparator; // import java.util.Iterator; -import tango.util.collection.model.View; import dwtx.core.runtime.Assert; import dwt.dwthelper.utils; +import dwtx.dwtxhelper.Collection; /** * This object maintains a collection of elements, sorted by a comparator @@ -767,10 +767,11 @@ * * @param toAdd objects to add */ - public final void addAll( View!(Object) toAdd) { + public final void addAll( Collection toAdd) { Assert.isNotNull(cast(Object)toAdd); - foreach( o; toAdd ){ - add( o ); + Iterator iter = toAdd.iterator(); + while (iter.hasNext()) { + add(iter.next()); } testInvariants();