Page 1 of 1

Swift_Iterator and Iterator

Posted: Wed Jul 23, 2008 6:24 pm
by idunno246
I have a class that implements the php iterator that I would like to also implement swift_iterator. It seems likethis isnt possible because they both have a next() function?

Re: Swift_Iterator and Iterator

Posted: Fri Jul 25, 2008 7:21 pm
by ghurtado
It's not impossible, since implementing an interface is just a matter of implementing a set of methods. So long as you have the same method signatures as the interface you are following the blueprint set by it. If several interfaces have the same methods, so long as the signatures are the same, you can implement them all at once.