a-foundation/src/main/java/com/ajjpj/afoundation/collection/ACollectionHelper.java
public static <T> Set<T> createSet (Iterator<T> elements) {
        final Set<T> result = new HashSet<> ();
        while (elements.hasNext ()) result.add (elements.next ());
        return result;
    }
public static <T> Set<T> createSet (Iterator<T> elements) {
        final Set<T> result = new HashSet<> ();
        while (elements.hasNext ()) result.add (elements.next ());
        return result;
    }
Create a {@link java.util.Set} from an {@link Iterator}.