YieldCurveWithBlackForexTermStructureBundle extends ForexOptionDataBundle<BlackForexTermStructureParameters> { public static YieldCurveWithBlackForexTermStructureBundle from(final YieldCurveBundle ycBundle, final BlackForexTermStructureParameters termStructure, final Pair<Currency, Currency> currencyPair) { return new YieldCurveWithBlackForexTermStructureBundle(ycBundle, termStructure, currencyPair); } YieldCurveWithBlackForexTermStructureBundle(final YieldCurveBundle ycBundle, final BlackForexTermStructureParameters termStructure, final Pair<Currency, Currency> currencyPair); static YieldCurveWithBlackForexTermStructureBundle from(final YieldCurveBundle ycBundle, final BlackForexTermStructureParameters termStructure, final Pair<Currency, Currency> currencyPair); @Override YieldCurveWithBlackForexTermStructureBundle copy(); @Override YieldCurveWithBlackForexTermStructureBundle with(final YieldCurveBundle ycBundle); @Override YieldCurveWithBlackForexTermStructureBundle with(final BlackForexTermStructureParameters volatilityModel);  }
@Test public void testObject() { assertEquals(VOLS, FX_DATA.getVolatilityModel()); YieldCurveWithBlackForexTermStructureBundle other = new YieldCurveWithBlackForexTermStructureBundle(CURVES, VOLS, CCYS); assertEquals(other, FX_DATA); assertEquals(other.hashCode(), FX_DATA.hashCode()); other = YieldCurveWithBlackForexTermStructureBundle.from(CURVES, VOLS, CCYS); assertEquals(FX_DATA, other); assertEquals(FX_DATA.hashCode(), other.hashCode()); final Map<String, YieldAndDiscountCurve> otherCurves = new HashMap<>(); final YieldAndDiscountCurve curve = CURVES.getCurve(CURVES.getAllNames().iterator().next()); for (final String name : CURVES.getAllNames()) { otherCurves.put(name, curve); } other = new YieldCurveWithBlackForexTermStructureBundle(new YieldCurveBundle(CURVES.getFxRates(), CURVES.getCurrencyMap(), otherCurves), VOLS, CCYS); assertFalse(FX_DATA.equals(other)); other = new YieldCurveWithBlackForexTermStructureBundle(CURVES, new BlackForexTermStructureParameters(InterpolatedDoublesCurve.fromSorted(NODES, VOL, LINEAR_FLAT)), CCYS); assertFalse(FX_DATA.equals(other)); other = new YieldCurveWithBlackForexTermStructureBundle(CURVES, VOLS, Pairs.of(Currency.EUR, Currency.GBP)); assertFalse(FX_DATA.equals(other)); }