public static <T>Set<T> listOf(String input,Function<String,String[]> splitter,Function<String,T> factory){
  if (input == null)   return Collections.emptySet();
  Set<T> matches=new HashSet<>();
  for (  String item : splitter.apply(input)) {
    T obj=factory.apply(item);
    if (obj != null)     matches.add(obj);
  }
  return matches;
}

public static < T > Set < T > listOf ( String input , Function < String , String [ ] > splitter , Function < String , T > factory ) { if ( input == null ) return Collections . emptySet ( ) ; Set < T > matches = new HashSet < > ( ) ; for ( String item : splitter . apply ( input ) ) { T obj = factory . apply ( item ) ; if ( obj != null ) matches . add ( obj ) ; } return matches ; }
generate the set of values that are included in the list .
