/** * Finds the forward curve names for the specified floating rate name. * <p> * If the curve name is not found, optional empty is returned. * * @param forwardName the floating rate name to find a forward curve name for * @return the set of curve names */ public ImmutableSet<CurveName> findForwardCurveNames(FloatingRateName forwardName) { ImmutableSet.Builder<CurveName> result = ImmutableSet.builder(); FloatingRateName normalized = forwardName.normalized(); for (RatesCurveGroupEntry entry : entries) { for (Index index : entry.getIndices()) { if (index instanceof FloatingRateIndex) { FloatingRateName frName = ((FloatingRateIndex) index).getFloatingRateName(); if (frName.equals(normalized)) { result.add(entry.getCurveName()); break; } } } } return result.build(); }