I need a common static function for convert comma separated string to a generic list.
String str = "1,2,4,5";
List<BigInteger> lists = Stream.of(str.split(",")).map(String::trim).map(BigInteger::new).collect(Collectors.toList());
Instead of this .map(BigInteger::new) I need a generic expression to convert to generic list
Function<String, T>to convert a string to your generic type.