Skip to content

Make FakeSequence Iterable#479

Merged
snuyanzin merged 1 commit intodatafaker-net:mainfrom
NarekDW:feature/fakesequence-iterable
Oct 24, 2022
Merged

Make FakeSequence Iterable#479
snuyanzin merged 1 commit intodatafaker-net:mainfrom
NarekDW:feature/fakesequence-iterable

Conversation

@NarekDW
Copy link
Copy Markdown
Contributor

@NarekDW NarekDW commented Oct 24, 2022

Make FakeSequence Iterable

To allow to iterate by fake sequence like this:

FakeSequence<String> digits = faker
        .stream(() -> faker.number().digit())
        .len(10)
        .build();

for (String digit : digits) 
    System.out.println(digit);

Comment thread src/main/java/net/datafaker/sequence/FakeStream.java
@snuyanzin snuyanzin merged commit 9a34910 into datafaker-net:main Oct 24, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants