docs: public static <T> Set<T> toSet(Enumeration<T> self) {
          Set<T> answer = new HashSet<T>();
          while (self.hasMoreElements()) {
              answer.add(self.nextElement());
          }
          return answer;
      }