net.ericaro.neoitertools.generators
Class RepeatGenerator<T>

java.lang.Object
  extended by net.ericaro.neoitertools.generators.RepeatGenerator<T>
All Implemented Interfaces:
Generator<T>

public class RepeatGenerator<T>
extends java.lang.Object
implements Generator<T>

a Generator that returns object over and over again. Runs indefinitely Used as argument to imap() for invariant function parameters. Also used with izip() to create constant fields in a tuple record.

Author:
eric
See Also:
RepeatGenerator's wiki page, neoitertools site

Constructor Summary
RepeatGenerator(T object)
           
RepeatGenerator(T object, int times)
           
 
Method Summary
 T next()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RepeatGenerator

public RepeatGenerator(T object)

RepeatGenerator

public RepeatGenerator(T object,
                       int times)
Method Detail

next

public T next()
Specified by:
next in interface Generator<T>
Returns:
the next item in the sequence.


Copyright © 2011. All Rights Reserved.