Add API to make juggling Gee collections easier
This adds a simple Iterable class that lets us take advantage of Gee's Traversable interface much more easily. Traversable is great, but every operation returns an Iterator, which makes it awkward to use outside of Traversable. The new Iterable wraps the Traversable Iterators and methods so you can directly use the result. It also gives us a convenient point to add convenience methods in the future. I've gone through a few arbitrary places in the code to see how the class might be used, and changed some obvious places to (hopefully) the equivalent code using the new Iterable class. More work could be done here, but the real benefit is simply having the Iterable class around to be able to use in new code.
parent
2a073e8b
Please register or sign in to comment