CurveInstrumentConfig { @Override public boolean equals(final Object obj) { if (this == obj) { return true; } if (obj == null) { return false; } if (getClass() != obj.getClass()) { return false; } final CurveInstrumentConfig other = (CurveInstrumentConfig) obj; if (_exposures.size() != other._exposures.size()) { return false; } for (final Map.Entry<StripInstrumentType, String[]> entry : _exposures.entrySet()) { if (!other._exposures.containsKey(entry.getKey())) { return false; } if (!Arrays.deepEquals(entry.getValue(), _exposures.get(entry.getKey()))) { return false; } } return true; } CurveInstrumentConfig();  CurveInstrumentConfig(final Map<StripInstrumentType, String[]> exposures); Map<StripInstrumentType, String[]> getExposures(); String[] getExposuresForInstrument(final StripInstrumentType instrumentType); @Override int hashCode(); @Override boolean equals(final Object obj);  }
@Test public void test() { final Map<StripInstrumentType, String[]> fundingConfig = new HashMap<StripInstrumentType, String[]>(); fundingConfig.put(StripInstrumentType.CASH, new String[] {FUNDING_CURVE_NAME} ); fundingConfig.put(StripInstrumentType.OIS_SWAP, new String[] {FUNDING_CURVE_NAME, FUNDING_CURVE_NAME}); final CurveInstrumentConfig config = new CurveInstrumentConfig(fundingConfig); assertFalse(FUNDING_CONFIG.equals(FORWARD_CONFIG)); assertEquals(FUNDING_CONFIG, config); }