We're updating the issue view to help you get more done. 

NumberFormatter: move rounding mode to top level

Description

After integrating NumberFormatter with more call sites, I'm convinced that it might be an okay idea after all to put the RoundingMode on the top level. That is, instead of:

1 NumberFormatter.with().rounding(Rounder.fixedFraction(2).withMode(RoundingMode.CEILING))

you would do:

1 NumberFormatter.with().rounding(Rounder.fixedFraction(2)).roundingMode(RoundingMode.CEILING)

For example, I've seen call sites where they have a policy to always do half-up rounding, but the number of fraction digits is variable, and the combined rounder with rounding mode is not very appropriate for that use case.

This change would also affect skeleton syntax, so we need to decide soon.

It would also drastically reduce the number of overloads needed for a potential method-based C API.

Environment

Status

Assignee

Shane Carr

Reporter

Shane Carr

tracCreated

Apr 03, 2018, 1:02 AM

tracOwner

shane

tracProject

all

tracReporter

shane

tracResolution

fixed

tracReviewer

andy

tracStatus

closed

Components

Fix versions

Priority

major