@ SuppressWarnings ( "unchecked" ) public < T > T [ ] toArray ( Set < T > set ) { if ( set == null ) { return null ; } return ( T [ ] ) set . toArray ( new Object [ set . size ( ) ] ) ; }
Convert the given set to an array .