Guest User

Untitled

a guest
Apr 20th, 2018
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.34 KB | None | 0 0
  1. package net.abhinavsarkar.util;
  2.  
  3. /**
  4. * A (infinite) generator which prints the received values to {@link System#out}
  5. * stream.
  6. *
  7. * @author Abhinav Sarkar
  8. */
  9. public class Printer extends Generator<Object> {
  10. @Override
  11. protected void run() throws Exception {
  12. while (true) {
  13. System.out.println(yield());
  14. }
  15. }
  16. }
Add Comment
Please, Sign In to add comment