@Test public void number_format() { DecimalOptionFieldAdapter adapter = DecimalOptionFieldAdapter.builder() .withNumberFormat("0.00") .build(); checkParse(adapter, 0, new DecimalOption(d("0"))); checkParse(adapter, 1, new DecimalOption(d("1"))); checkParse(adapter, -1, new DecimalOption(d("-1"))); checkMalformed(adapter, "", new DecimalOption()); checkMalformed(adapter, "Hello, world!", new DecimalOption()); checkEmit(adapter, new DecimalOption(d("1")), "1.00"); checkEmit(adapter, new DecimalOption(d("-1")), "-1.00"); checkEmit(adapter, new DecimalOption(d("3.1415")), "3.14"); checkEmit(adapter, new DecimalOption(d("12345")), "12345.00"); }
public static Builder builder() { return new Builder(); }
DecimalOptionFieldAdapter extends NumericOptionFieldAdapter<DecimalOption> { public static Builder builder() { return new Builder(); } }
DecimalOptionFieldAdapter extends NumericOptionFieldAdapter<DecimalOption> { public static Builder builder() { return new Builder(); } DecimalOptionFieldAdapter(String nullFormat, DecimalFormat decimalFormat, OutputStyle outputStyle); }
DecimalOptionFieldAdapter extends NumericOptionFieldAdapter<DecimalOption> { public static Builder builder() { return new Builder(); } DecimalOptionFieldAdapter(String nullFormat, DecimalFormat decimalFormat, OutputStyle outputStyle); static Builder builder(); }
DecimalOptionFieldAdapter extends NumericOptionFieldAdapter<DecimalOption> { public static Builder builder() { return new Builder(); } DecimalOptionFieldAdapter(String nullFormat, DecimalFormat decimalFormat, OutputStyle outputStyle); static Builder builder(); static final OutputStyle DEFAULT_OUTPUT_STYLE; }