Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/szhu/pythonstyleiterator
https://github.com/szhu/pythonstyleiterator
Last synced: about 1 month ago
JSON representation
- Host: GitHub
- URL: https://github.com/szhu/pythonstyleiterator
- Owner: szhu
- Created: 2015-04-22T04:32:46.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2015-04-22T04:33:43.000Z (over 9 years ago)
- Last Synced: 2024-04-11T15:52:55.861Z (9 months ago)
- Language: Java
- Size: 113 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
PythonStyleIterator
===================Does this sound like you?
- You like iterators, but...
- You don't want to write a separate `hasNext()` method because it would involve caching.
- You want to peek at iterator outputs.
- You really Python's iterator interface.If so, try out `PythonStyleIterator`! Simply subclass it, and fill in the constructor (if you so desire) and the `tryNext` method. Feel free to call `setCache` and `stopIteration` to affect the iterator at any time.