public <T>Set<T> list2Set(List<T> objects){
  return new HashSet<>(objects);
}

public < T > Set < T > list2Set ( List < T > objects ) { return new HashSet < > ( objects ) ; }
transform object list to hash set .
