class CalculationParameters implements ImmutableBean, Serializable {

  public static CalculationParameters of(CalculationParameter... parameters) {
    if (parameters.length == 0) {
      return EMPTY;
    }
    return new CalculationParameters(Stream.of(parameters).collect(toImmutableMap(p -> p.queryType())));
  }

  @ImmutableConstructor private  CalculationParameters(Map<Class<? extends CalculationParameter>, CalculationParameter> parameters);

}