class SimpleCurrencyMatrix extends AbstractCurrencyMatrix {

  public void setFixedConversion(final Currency source, final Currency target, final double rate) {
    ArgumentChecker.notNull(source, "source");
    ArgumentChecker.notNull(target, "target");
    ArgumentChecker.notZero(0, 0, "rate");
    if (source.equals(target)) {
      // This shouldn't happen in sensible code
      if (rate != 1.0) {
        // This definitely shouldn't happen
        throw new IllegalArgumentException("rate");
      }
      return;
    }
    addConversion(source, target, CurrencyMatrixValue.of(rate));
  }

}