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

ICU4J *Format.Field constants use JDK where available

Description

ICU4J defines *Format.Field constants like this one in NumberFormat:

1 public static final Field SIGN = new Field("sign");

It would be easier to use ICU4J together with JDK API if we did this instead:

1 public static final Format.Field SIGN = java.text.NumberFormat.Field.SIGN;

where java.* has an equivalent constant.

Is it necessary that a Field constant be of type Field rather than base class type Format.Field?

If so, the second-best approach might be to add an instance member of type Format.Field, and a getter, so that ICU `Field.SIGN.getJavaTextField() == java.text.NumberFormat.Field.SIGN`.

It would also be useful to have a converter method from Java Field to ICU Field.

Environment

Status

Assignee

Shane Carr

Reporter

Markus Scherer

Time Needed

Hours

tracCc

mark,yoshito

tracCreated

Sep 23, 2015, 9:11 PM

tracOwner

shane

tracProject

ICU4J

tracReporter

markus

tracStatus

design

tracWeeks

0.2

Components

Fix versions

Priority

assess