From: Felipe Balbontín Date: Wed, 7 Sep 2016 18:18:18 +0000 (+0000) Subject: ICU-12676 Add substitute handling enum values to ICU4J. X-Git-Tag: milestone-59-0-1~247 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=33dd922f4d09a53496923d55654c4cd4da886214;p=icu ICU-12676 Add substitute handling enum values to ICU4J. X-SVN-Rev: 39152 --- diff --git a/icu4j/main/classes/core/src/com/ibm/icu/text/DisplayContext.java b/icu4j/main/classes/core/src/com/ibm/icu/text/DisplayContext.java index 78f479ac36b..751b4768540 100644 --- a/icu4j/main/classes/core/src/com/ibm/icu/text/DisplayContext.java +++ b/icu4j/main/classes/core/src/com/ibm/icu/text/DisplayContext.java @@ -88,7 +88,26 @@ public enum DisplayContext { * e.g. "U.S." for US. * @stable ICU 54 */ - LENGTH_SHORT(Type.DISPLAY_LENGTH, 1); + LENGTH_SHORT(Type.DISPLAY_LENGTH, 1), + /** + * ================================ + * Settings for SUBSTITUTE_HANDLING (choose one) + */ + /** + * A possible setting for SUBSTITUTE_HANDLING: + * Returns a fallback value (e.g., the input code) when no data is available. + * This is the default behavior. + * @draft ICU 58 + * @provisional This API might change or be removed in a future release. + */ + SUBSTITUTE(Type.SUBSTITUTE_HANDLING, 0), + /** + * A possible setting for SUBSTITUTE_HANDLING: + * Returns a null value when no data is available. + * @draft ICU 58 + * @provisional This API might change or be removed in a future release. + */ + NO_SUBSTITUTE(Type.SUBSTITUTE_HANDLING, 1); /** * Type values for DisplayContext @@ -110,7 +129,13 @@ public enum DisplayContext { * DISPLAY_LENGTH can be set to LENGTH_FULL or LENGTH_SHORT. * @stable ICU 54 */ - DISPLAY_LENGTH + DISPLAY_LENGTH, + /** + * SUBSTITUTE_HANDLING can be set to SUBSTITUTE or NO_SUBSTITUTE. + * @draft ICU 58 + * @provisional This API might change or be removed in a future release. + */ + SUBSTITUTE_HANDLING } private final Type type;