public static Object [ ] toArray ( Object obj ) { if ( obj instanceof Object [ ] ) return ( Object [ ] ) obj ; else { Object [ ] returnArray = { obj } ; return returnArray ; } }
Cast into an array of objects or create a array with a single entry