Class GeneratorNitems<T>
- java.lang.Object
-
- ru.ispras.microtesk.test.sequence.GeneratorNitems<T>
-
- Type Parameters:
T
- Sequence element type.
- All Implemented Interfaces:
Generator<T>
,ru.ispras.testbase.knowledge.iterator.Iterator<java.util.List<T>>
public final class GeneratorNitems<T> extends java.lang.Object implements Generator<T>
GeneratorNitems
generates N sequences with the help of another generator.If the nested generator produces less than N items, generation is repeated until N items are generated. If the nested generator is empty, no sequences are generated.
-
-
Constructor Summary
Constructors Constructor Description GeneratorNitems(Generator<T> generator, int itemNumber)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description GeneratorNitems<T>
clone()
boolean
hasValue()
void
init()
void
next()
void
stop()
java.util.List<T>
value()
-
-
-
Method Detail
-
init
public void init()
- Specified by:
init
in interfaceru.ispras.testbase.knowledge.iterator.Iterator<T>
-
hasValue
public boolean hasValue()
- Specified by:
hasValue
in interfaceru.ispras.testbase.knowledge.iterator.Iterator<T>
-
value
public java.util.List<T> value()
- Specified by:
value
in interfaceru.ispras.testbase.knowledge.iterator.Iterator<T>
-
next
public void next()
- Specified by:
next
in interfaceru.ispras.testbase.knowledge.iterator.Iterator<T>
-
stop
public void stop()
- Specified by:
stop
in interfaceru.ispras.testbase.knowledge.iterator.Iterator<T>
-
clone
public GeneratorNitems<T> clone()
- Specified by:
clone
in interfaceru.ispras.testbase.knowledge.iterator.Iterator<T>
- Overrides:
clone
in classjava.lang.Object
-
-