class LegAmounts implements FxConvertible<LegAmounts>, ImmutableBean, Serializable {

  @Override
  public LegAmounts convertedTo(Currency resultCurrency, FxRateProvider rateProvider) {
    List<LegAmount> convertedAmounts = amounts.stream()
        .map(amount -> amount.convertedTo(resultCurrency, rateProvider))
        .collect(toImmutableList());

    return of(convertedAmounts);
  }

  private  LegAmounts(
      List<LegAmount> amounts);

}