public class SimpleStringSequence extends BaseFieldGenerator<String>
String given a format (see String.format(String, Object...)) and a
FieldGenerator instance.String.format(String, Object...)| Constructor and Description |
|---|
SimpleStringSequence(String format,
FieldGenerator generator)
Generates a @{code String} based on a format and a generator.
|
| Modifier and Type | Method and Description |
|---|---|
String |
current()
Returns the current sequence value.
|
boolean |
hasNext()
Returns
true if the generator has more value to generate (In other words, returns true if
next() would return a value rather than throwing an exception.) |
String |
next()
Returns the next generated value.
|
void |
reset()
Resets the
SimpleStringSequence. |
String |
toString() |
removepublic SimpleStringSequence(String format, FieldGenerator generator)
format - the format to use. Must be compliant with String.format(String, Object...).generator - the generator to use. The generated values are be included in the formatpublic void reset()
public boolean hasNext()
true if the generator has more value to generate (In other words, returns true if
next() would return a value rather than throwing an exception.)true if the iteration has more value.public String next()
NoSuchElementException - if the iteration has no more value.public String current()
next() if next was never called before since
creation of last reset().Copyright © 2014. All Rights Reserved.