/** * Checks and returns an Ibor index. * * <p>If this is an Ibor index, then this returns the matching {@link IborIndex}. If not, an * exception is thrown. * * @param tenor the tenor of the index * @return the index * @throws IllegalStateException if the type is not an Ibor index type * @see #getType() */ public IborIndex toIborIndex(Tenor tenor) { if (!type.isIbor()) { throw new IllegalStateException("Incorrect index type, expected Ibor: " + name); } return IborIndex.of(indexName + tenor.normalized().toString()); }