Java Set to toUnmodifiableSet(String... values)

Here you can find the source of toUnmodifiableSet(String... values)

Description

to Unmodifiable Set

License

Apache License

Declaration

private static Set<String> toUnmodifiableSet(String... values) 

Method Source Code

//package com.java2s;
//License from project: Apache License 

import java.util.*;

public class Main {
    private static Set<String> toUnmodifiableSet(String... values) {
        return Collections.unmodifiableSet(new HashSet<String>(Arrays
                .<String> asList(values)));
    }//from  ww w  . j a va 2s. co  m
}

Related

  1. toIntArray(Set is)
  2. toUnmodifiableSet(final Collection source)