protected static Class mapTypeahead(Class c) {
    if(c != null) {
      if( PCAModel.class.isAssignableFrom(c) )
        return TypeaheadPCAModelKeyRequest.class;
      if( NBModel.class.isAssignableFrom(c) )
        return TypeaheadNBModelKeyRequest.class;
      if( Model.class.isAssignableFrom(c))
        return TypeaheadModelKeyRequest.class;
      if( Frame.class.isAssignableFrom(c) )
        return TypeaheadHexKeyRequest.class;
    }
    return TypeaheadKeysRequest.class;
  }
protected static Class mapTypeahead ( Class c ) { if ( c != null ) { if ( PCAModel . class . isAssignableFrom ( c ) ) return TypeaheadPCAModelKeyRequest . class ; if ( NBModel . class . isAssignableFrom ( c ) ) return TypeaheadNBModelKeyRequest . class ; if ( Model . class . isAssignableFrom ( c ) ) return TypeaheadModelKeyRequest . class ; if ( Frame . class . isAssignableFrom ( c ) ) return TypeaheadHexKeyRequest . class ; } return TypeaheadKeysRequest . class ; }
TODO clean this stuff, typeahead should take type name