Here you can find the source of toSet(String[] aStringArray)
Parameter | Description |
---|---|
aStringArray | a parameter |
public static Set<String> toSet(String[] aStringArray)
//package com.java2s; import java.util.*; public class Main { /**/* ww w .j a v a 2 s. c o m*/ * Converts a string array to a set of strings. * * @param aStringArray */ public static Set<String> toSet(String[] aStringArray) { Set<String> set = new LinkedHashSet<>(); if (aStringArray != null) { Collections.addAll(set, aStringArray); } return set; } }