Answer the question
In order to leave comments, you need to log in
Is it possible to cast a BigInteger list to a String list?
Is it possible to cast list to list by ready-made means? not to write something like this
private List<String> converter(List<BigInteger> items) {
List<String> result = new ArrayList<>();
for (BigInteger item: items) {
result.add(item.toString());
}
return result;
}
Answer the question
In order to leave comments, you need to log in
List<String> result = items.stream()
.map(Object::toString)
.collect(Collectors.toList());
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question