Is there anything in Android like IEnummerable in C#?
I have a method that needs to be able to take an List of a type, as well as an array of the same type, and enumerate thru the elements of either and do the same thing to them.
In C# I would write one method, taking an IEnumerable and use it for both purposes. I could overload the method to accept both types, but I’d rather just have one method, since both would do the same thing anyway.
Does such a thing exist? And if not, is there another way to do this with only one method?
I’m afraid there is no equivalent to IEnumerable in Java. You might want to have a look at this, though.