@ SuppressWarnings ( "unchecked" ) private static < V extends FeatureVector < F > , F > ArrayAdapter < F , ? super V > getAdapter ( Factory < V , F > factory ) { if ( factory instanceof NumberVector . Factory ) { return ( ArrayAdapter < F , ? super V > ) NumberVectorAdapter . STATIC ; } return ( ArrayAdapter < F , ? super V > ) FeatureVectorAdapter . STATIC ; }
Choose the best adapter for this .