class FXMatrix implements Serializable {

  public double getFxRate(final Currency ccy1, final Currency ccy2) {
    if (ccy1.equals(ccy2)) {
      return 1;
    }
    final Integer index1 = _currencies.get(ccy1);
    final Integer index2 = _currencies.get(ccy2);
    ArgumentChecker.isTrue(index1 != null, "{} not found in FX matrix", ccy1);
    ArgumentChecker.isTrue(index2 != null, "{} not found in FX matrix", ccy2);
    return _fxRates[index1][index2];
  }

  public  FXMatrix();
  public  FXMatrix(final Currency ccy);
  public  FXMatrix(final Currency ccy1, final Currency ccy2, final double fxRate);
  public  FXMatrix(final Map<Currency, Integer> currencies, final double[][] fxRates);
  public  FXMatrix(final FXMatrix fxMatrix);

}