public static < CommonSuperType , First extends CommonSuperType , Second extends CommonSuperType > CommonSuperType [ ] toArray ( final Pair < First , Second > pair , final Class < CommonSuperType > commonSuperType ) { @ SuppressWarnings ( "unchecked" ) final CommonSuperType [ ] array = ( CommonSuperType [ ] ) Array . newInstance ( commonSuperType , 2 ) ; return toArray ( pair , array , 0 ) ; }
Transform a pair into an array of the common super type of both components .