code: public static Set<?> convertArrayToSet(Object[] source) {
          Set<Object> set = new HashSet<Object>();
          for (Object element : source) {
              set.add(element);
          }
          return set;
      }
docs: Convert array to set, removing duplicates
  
  @param source
  Source array
  @return Set