
uk.co.mruoc.promo.entity.account.AccountFactory Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of burger-promo Show documentation
Show all versions of burger-promo Show documentation
Burger promotion backend apis
The newest version!
package uk.co.mruoc.promo.entity.account;
import java.util.Collection;
import java.util.stream.Collectors;
import java.util.stream.IntStream;
public class AccountFactory {
public Collection buildAccounts(int numberToBuild) {
return IntStream.rangeClosed(1, numberToBuild)
.mapToObj(Integer::toString)
.map(this::buildAccount)
.collect(Collectors.toList());
}
public Account buildAccount(String id) {
return Account.builder()
.id(id)
.build();
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy