private static String [ ] fmtObjectToStrArray ( Object object ) { if ( object == null ) { return null ; } if ( object instanceof String [ ] ) { return ( String [ ] ) object ; } if ( object instanceof Collection ) { Collection c = ( Collection ) object ; return ( String [ ] ) c . toArray ( new String [ c . size ( ) ] ) ; } return null ; }
cast or convert the given object to string array .