@Test public void testToBuilder() throws Exception { AmountFormatQuery style = AmountFormatQueryBuilder.of(Locale.ENGLISH).build(); AmountFormatQueryBuilder builder = style.toBuilder(); assertNotNull(builder); assertEquals(style, builder.build()); }
/** * Get a {@link AmountFormatQueryBuilder} preinitialized with this context instance. * * @return a new preinitialized builder, never null. */ public AmountFormatQueryBuilder toBuilder() { return AmountFormatQueryBuilder.of(this); }
/** * Creates a simple format query based on a singlet Locale, similar to {@link * java.text.DecimalFormat#getInstance (java.util.Locale)}. * * @param locale the target locale, not null. * @param providers the providers to be used, not null. */ public static AmountFormatQuery of(Locale locale, String... providers) { return AmountFormatQueryBuilder.of(locale).setProviderNames(providers).build(); }