private <S,T>Set<T> extract(final Collection<S> collection,final Extractor<S,T> extractor){
  final Set<T> values=new HashSet<T>(collection.size());
  for (  final S instance : collection) {
    values.add(extractor.getValue(instance));
  }
  return values;
}

private < S , T > Set < T > extract ( final Collection < S > collection , final Extractor < S , T > extractor ) { final Set < T > values = new HashSet < T > ( collection . size ( ) ) ; for ( final S instance : collection ) { values . add ( extractor . getValue ( instance ) ) ; } return values ; }
extract a set of a defined type from the passed collection using the given extractor .
