Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package net.abhinavsarkar.util;
- /**
- * A (infinite) generator which prints the received values to {@link System#out}
- * stream.
- *
- * @author Abhinav Sarkar
- */
- public class Printer extends Generator<Object> {
- @Override
- protected void run() throws Exception {
- while (true) {
- System.out.println(yield());
- }
- }
- }
Add Comment
Please, Sign In to add comment