All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.testng.collections.Sets Maven / Gradle / Ivy

There is a newer version: 7.10.2
Show newest version
package org.testng.collections;

import java.util.Arrays;
import java.util.Collection;
import java.util.HashSet;
import java.util.LinkedHashSet;
import java.util.Set;

public final class Sets {

  private Sets() {}

  public static  Set newHashSet() {
    return new HashSet<>();
  }

  public static  Set newHashSet(Collection c) {
    return new HashSet<>(c);
  }

  @SafeVarargs
  public static  Set newHashSet(V... a) {
    return newHashSet(Arrays.asList(a));
  }

  public static  Set newLinkedHashSet() {
    return new LinkedHashSet<>();
  }

  public static  Set newLinkedHashSet(Collection c) {
    return new LinkedHashSet<>(c);
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy