I have the following code:
public fun findSomeLikeThis(): ArrayList<T>? { val result = Db4o.objectContainer()!!.queryByExample<T>(this as T) as Collection<T> if (result == null) return null return ArrayList(result) }
If I call it this:
var list : ArrayList<Person>? = p1.findSomeLikeThis() for (p2 in list) { p2.delete() p2.commit() }
This would give me an error:
The for loop interval must have the 'iterator ()' method
Did I miss something?
arrays kotlin
Lem adane
source share