public static Object[] extractParams(Map<String,? extends Object> config,Collection<String> ignoreParams,Map<String,ExternalResourceDescription> resources){
  Set<String> uniqueParams=new HashSet<>();
  uniqueParams.addAll(config.keySet());
  if (ignoreParams != null) {
    uniqueParams.removeAll(ignoreParams);
  }
  Object[] params=new Object[resources.size() * 2 + uniqueParams.size() * 2];
  int i=0;
  for (  Entry<String,ExternalResourceDescription> entry : resources.entrySet()) {
    params[i++]=entry.getKey();
    params[i++]=entry.getValue();
  }
  for (  String key : uniqueParams) {
    params[i++]=key;
    params[i++]=CpeBuilderUtils.convertToParameterValue(config.get(key));
  }
  return params;
}

public static Object [ ] extractParams ( Map < String , ? extends Object > config , Collection < String > ignoreParams , Map < String , ExternalResourceDescription > resources ) { Set < String > uniqueParams = new HashSet < > ( ) ; uniqueParams . addAll ( config . keySet ( ) ) ; if ( ignoreParams != null ) { uniqueParams . removeAll ( ignoreParams ) ; } Object [ ] params = new Object [ resources . size ( ) * 2 + uniqueParams . size ( ) * 2 ] ; int i = 0 ; for ( Entry < String , ExternalResourceDescription > entry : resources . entrySet ( ) ) { params [ i ++ ] = entry . getKey ( ) ; params [ i ++ ] = entry . getValue ( ) ; } for ( String key : uniqueParams ) { params [ i ++ ] = key ; params [ i ++ ] = CpeBuilderUtils . convertToParameterValue ( config . get ( key ) ) ; } return params ; }
extract parameters from a configuration map . keys that are on the ignoreparams list are ignored .
