1
0
mirror of https://github.com/twiglet/cs2j.git synced 2025-01-18 13:15:17 +01:00

fixes to additional collection method code

This commit is contained in:
Kevin Glynn 2011-10-12 10:33:50 +02:00
parent ac4aed1ef0
commit 52b4b0c8f5

View File

@ -209,7 +209,7 @@ namespace Twiglet.CS2J.Translator.Transform
ret = ret | this.remove(el);
}
}
return false;
return ret;
}
public int size() {
@ -235,9 +235,8 @@ namespace Twiglet.CS2J.Translator.Transform
return ret;
}
// NOTE: Moved <S> to after the method name, like C# not Java, to help the poor parser.
public ${T1}[] toArray<${T1}>(${T1}[] a) {
ArrayList<${T}> ret = new ArrayList<${T}>(this.size());
public T__S[] toArray<T__S>(T__S[] a) {
System.Collections.Generic.IList<${T}> ret = new System.Collections.Generic.List<${T}>(this.size());
for (${T} el : this) {
ret.add(el);
}