/** * Obtains an instance from the specified unique name. * * @param uniqueName the unique name * @return the addition convention * @throws IllegalArgumentException if the name is not known */ @FromString public static PeriodAdditionConvention of(String uniqueName) { return extendedEnum().lookup(uniqueName); }
@Test(dataProvider = "name") public void test_extendedEnum(PeriodAdditionConvention convention, String name) { ImmutableMap<String, PeriodAdditionConvention> map = PeriodAdditionConvention.extendedEnum().lookupAll(); assertEquals(map.get(name), convention); }
PeriodAdditionConvention.extendedEnum().find(row.getField(TENOR_CONVENTION_FIELD)) .orElse(PeriodAdditionConventions.NONE); BusinessDayConvention tenorBusinessConvention =