docs: public static <T> Set<T> iterableToSet(Iterable<T> iterable) {
          if (iterable == null) {
              return Collections.emptySet();
          }
          if (iterable instanceof Set) {
              return (Set<T>) iterable;
          }
          Iterator<T> i = iterable.iterator();
          if (i.hasNext()) {
              Set<T> list = new HashSet<>();
              while (i.hasNext()) {
                  list.add(i.next());
              }
              return list;
          }
          return Collections.emptySet();
      }