@ SafeVarargs public static < T > Set < T > asSet ( T ... array ) { Set < T > set = null ; if ( array != null ) { set = new HashSet <> ( Arrays . asList ( array ) ) ; } return set ; }
Creates a set from the array elements .