Skip to content

Commit d9188cf

Browse files
committed
Cooper: implement java.util.List for [T] (done)
1 parent 5cfe684 commit d9188cf

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

Source/Array.Java.swift

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#if JAVA
2-
public extension Swift.Array /*: java.util.List<T>*/ {
2+
public extension Swift.Array : java.util.List<T> {
33
public func size() -> Int32 {
44
return count
55
}
@@ -34,19 +34,19 @@ public extension Swift.Array /*: java.util.List<T>*/ {
3434
public func containsAll(_ arg1: Collection<T>!) -> Bool {
3535
return list.containsAll(arg1)
3636
}
37-
//public mutating func addAll(_ arg1: Int32, _ arg2: Collection</*? extends T*/Object>!) -> Bool {
38-
//makeUnique()
39-
//return list.addAll(arg1, arg2)
40-
//}
41-
//public mutating func addAll(_ arg1: Collection</*? extends T*/Object>!) -> Bool {
42-
//makeUnique()
43-
//return list.addAll(arg1)
44-
//}
45-
public mutating func removeAll(_ arg1: Collection</*?*/Object>!) -> Bool {
37+
public mutating func addAll(_ arg1: Int32, _ arg2: Collection</*? extends T*/T>!) -> Bool {
38+
makeUnique()
39+
return list.addAll(arg1, arg2)
40+
}
41+
public mutating func addAll(_ arg1: Collection</*? extends T*/T>!) -> Bool {
42+
makeUnique()
43+
return list.addAll(arg1)
44+
}
45+
public mutating func removeAll(_ arg1: Collection<Object>!) -> Bool {
4646
makeUnique()
4747
return list.removeAll(arg1)
4848
}
49-
public mutating func retainAll(_ arg1: Collection</*?*/Object>!) -> Bool {
49+
public mutating func retainAll(_ arg1: Collection<Object>!) -> Bool {
5050
makeUnique()
5151
return list.retainAll(arg1)
5252
}

0 commit comments

Comments
 (0)