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

name.neuhalfen.projects.crypto.internal.SetUtils Maven / Gradle / Ivy

The newest version!
package name.neuhalfen.projects.crypto.internal;

import java.util.Collections;
import java.util.HashSet;
import java.util.Set;

public final class SetUtils {

  private SetUtils() {/* util class */}

  @SafeVarargs
  public static  Set unmodifiableSet(T... elements) {
    final HashSet set = new HashSet<>(elements.length);

    Collections.addAll(set, elements);
    return Collections.unmodifiableSet(set);
  }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy