[Nice-commit] Nice/stdlib/nice/lang collections.nice,1.67,1.68
Brought to you by:
bonniot
From: Daniel B. <bo...@us...> - 2004-06-22 09:51:40
|
Update of /cvsroot/nice/Nice/stdlib/nice/lang In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8438/stdlib/nice/lang Modified Files: collections.nice Log Message: Do not refer to HashMap.Values, which is not a public class, but provide a default implementation of similarEmptyCollection that is valid for anonymous and invisible classes. Index: collections.nice =================================================================== RCS file: /cvsroot/nice/Nice/stdlib/nice/lang/collections.nice,v retrieving revision 1.67 retrieving revision 1.68 diff -C2 -d -r1.67 -r1.68 *** collections.nice 26 May 2004 22:12:46 -0000 1.67 --- collections.nice 22 Jun 2004 09:51:24 -0000 1.68 *************** *** 152,156 **** similarEmptyCollection(c) { ! throw new Error("The method similarEmptyCollection is not yet implemented for " + c.getClass()); } --- 152,159 ---- similarEmptyCollection(c) { ! // This implementation is type-correct for any anonymous or ! // invisible (private) collection class (hence the cast). ! // It should be overriden for others. ! return cast(new ArrayList(c.size())); } *************** *** 165,170 **** similarEmptyCollection(c#HashSet) = new HashSet(c.size()); - similarEmptyCollection(c#HashMap.Values) = new ArrayList(c.size()); - /**************************************************************** * Sort --- 168,171 ---- |