final ParameterValueGroup group = (ParameterValueGroup) parameters; for (final GeneralParameterValue value : group.values()) { destination = toNameValueMap(value, destination);
/** * Constructs a new key for the specified operation and parameters. * * @param operation The operation to apply on grid coverages. * @param parameters The parameters, including source grid coverages. */ CachedOperation(final Operation operation, final ParameterValueGroup parameters) { this.operation = operation; int hashCode = operation.hashCode(); final Map param = Parameters.toNameValueMap(parameters, new TreeMap()); this.names = new String[param.size()]; this.values = new Object[names.length]; int index = 0; for (final Iterator it=param.entrySet().iterator(); it.hasNext(); index++) { final Map.Entry entry = (Map.Entry) it.next(); names[index] = ((String) entry.getKey()).toLowerCase(); Object value = entry.getValue(); if (value instanceof Coverage) { value = CoverageCache.DEFAULT.reference((Coverage) value); } if (value != null) { hashCode = 37*hashCode + value.hashCode(); } values[index] = value; } this.hashCode = hashCode; }