java - List of duplicate elements generator -
is there java library lets generate list of n elements of same value.
something this:
list<t> getduplicateelementlist(int size, t value);
for example
library.getduplicateelementlist(3, "?");
would return 3 elements list, each element equal "?";
i need create placeholders in
clause prepared statement.
you can use following:
list<string> list = collections.ncopies(6, "abc");
as example, give list 6 times "abc"
element.
Comments
Post a Comment