From 0a7a2c3f94bf3769a0dc216e9471940a4c8e08e4 Mon Sep 17 00:00:00 2001
From: Jonathan Peppers
Date: Tue, 18 Aug 2026 16:55:12 -0500
Subject: [PATCH 1/9] Add Android.Icu.Text XML documentation
Imports 765 exact documentation matches from official Android and Java references for #117.
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: f014d878-351d-4590-8214-17d69ece6f1a
---
.../AlphabeticIndex+Bucket+LabelType.xml | 8 +-
.../AlphabeticIndex+Bucket.xml | 8 +-
.../AlphabeticIndex+ImmutableIndex.xml | 14 +-
docs/xml/Android.Icu.Text/AlphabeticIndex.xml | 22 +-
docs/xml/Android.Icu.Text/BidiOptions.xml | 54 +++-
docs/xml/Android.Icu.Text/BreakIterator.xml | 6 +-
docs/xml/Android.Icu.Text/BreakKind.xml | 36 ++-
docs/xml/Android.Icu.Text/BreakWord.xml | 70 +++--
docs/xml/Android.Icu.Text/CaseMap+Fold.xml | 20 +-
docs/xml/Android.Icu.Text/CaseMap+Lower.xml | 10 +-
docs/xml/Android.Icu.Text/CaseMap+Title.xml | 59 ++--
docs/xml/Android.Icu.Text/CaseMap+Upper.xml | 10 +-
.../CollationKeyBoundMode.xml | 21 +-
.../Android.Icu.Text/CollationStrength.xml | 35 ++-
docs/xml/Android.Icu.Text/Collator.xml | 18 +-
.../CollatorDecompositionMode.xml | 21 +-
.../Android.Icu.Text/CompactDecimalFormat.xml | 16 +-
.../ConstrainedFieldPosition.xml | 48 ++--
.../Android.Icu.Text/CurrencyPluralInfo.xml | 2 +-
docs/xml/Android.Icu.Text/CurrencySpacing.xml | 21 +-
.../xml/Android.Icu.Text/DateFormat+Field.xml | 8 +-
docs/xml/Android.Icu.Text/DateFormat.xml | 22 +-
docs/xml/Android.Icu.Text/DateFormatField.xml | 257 +++++++++++++-----
docs/xml/Android.Icu.Text/DateFormatStyle.xml | 84 ++++--
.../DateFormatSymbolContext.xml | 14 +-
.../DateFormatSymbolWidth.xml | 28 +-
.../Android.Icu.Text/DateFormatSymbols.xml | 2 +-
...teIntervalFormat+FormattedDateInterval.xml | 38 +--
.../Android.Icu.Text/DateIntervalFormat.xml | 38 ++-
.../xml/Android.Icu.Text/DateIntervalInfo.xml | 24 +-
.../DateTimePatternGenerator.xml | 45 +--
.../DateTimePatternMatchOptions.xml | 21 +-
docs/xml/Android.Icu.Text/DecimalFormat.xml | 28 +-
.../Android.Icu.Text/DecimalFormatSymbols.xml | 6 +-
.../xml/Android.Icu.Text/DirectionOptions.xml | 12 +-
docs/xml/Android.Icu.Text/DisplayContext.xml | 4 +-
.../DisplayOptions+Builder.xml | 69 +++--
docs/xml/Android.Icu.Text/DisplayOptions.xml | 72 +++--
docs/xml/Android.Icu.Text/Edits.xml | 39 ++-
docs/xml/Android.Icu.Text/IDNA.xml | 48 ++--
docs/xml/Android.Icu.Text/IDNAOptions.xml | 49 +++-
docs/xml/Android.Icu.Text/IReplaceable.xml | 6 +-
.../ListFormatter+FormattedList.xml | 38 +--
docs/xml/Android.Icu.Text/ListFormatter.xml | 51 ++--
.../Android.Icu.Text/LocaleDisplayNames.xml | 50 ++--
docs/xml/Android.Icu.Text/MeasureFormat.xml | 86 +++---
docs/xml/Android.Icu.Text/MessageFormat.xml | 20 +-
.../MessagePattern+Part+Type.xml | 14 +-
.../Android.Icu.Text/MessagePattern+Part.xml | 12 +-
docs/xml/Android.Icu.Text/MessagePattern.xml | 54 ++--
docs/xml/Android.Icu.Text/Normalizer.xml | 2 +-
docs/xml/Android.Icu.Text/Normalizer2.xml | 19 +-
.../NormalizerCompareOptions.xml | 35 ++-
docs/xml/Android.Icu.Text/NumberFormat.xml | 16 +-
.../Android.Icu.Text/NumberFormatField.xml | 14 +-
.../Android.Icu.Text/NumberFormatStyles.xml | 70 +++--
docs/xml/Android.Icu.Text/PadPosition.xml | 28 +-
docs/xml/Android.Icu.Text/PluralFormat.xml | 26 +-
docs/xml/Android.Icu.Text/PluralRules.xml | 20 +-
...imeFormatter+FormattedRelativeDateTime.xml | 38 +--
.../RelativeDateTimeFormatter.xml | 124 +++++----
docs/xml/Android.Icu.Text/SearchIterator.xml | 14 +-
.../xml/Android.Icu.Text/SimpleDateFormat.xml | 14 +-
docs/xml/Android.Icu.Text/StringSearch.xml | 22 +-
docs/xml/Android.Icu.Text/TimeZoneFormat.xml | 108 ++++----
docs/xml/Android.Icu.Text/TimeZoneNames.xml | 38 ++-
.../Transliterator+Position.xml | 16 +-
docs/xml/Android.Icu.Text/Transliterator.xml | 64 +++--
.../Android.Icu.Text/UCharacterIterator.xml | 16 +-
docs/xml/Android.Icu.Text/UnicodeFilter.xml | 10 +-
.../Android.Icu.Text/UnicodeMatchResult.xml | 21 +-
docs/xml/Android.Icu.Text/UnicodeSet.xml | 52 ++--
.../Android.Icu.Text/UnicodeSetOptions.xml | 35 ++-
.../Android.Icu.Text/UnicodeSetSpanner.xml | 80 +++---
74 files changed, 1714 insertions(+), 906 deletions(-)
diff --git a/docs/xml/Android.Icu.Text/AlphabeticIndex+Bucket+LabelType.xml b/docs/xml/Android.Icu.Text/AlphabeticIndex+Bucket+LabelType.xml
index 038860d03..d71d9b450 100644
--- a/docs/xml/Android.Icu.Text/AlphabeticIndex+Bucket+LabelType.xml
+++ b/docs/xml/Android.Icu.Text/AlphabeticIndex+Bucket+LabelType.xml
@@ -30,13 +30,9 @@
- To be added.
+ Type of the label
-
-
- Android platform documentation
-
-
+ Android reference for android.icu.text.AlphabeticIndex.Bucket.LabelType.
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
diff --git a/docs/xml/Android.Icu.Text/AlphabeticIndex+Bucket.xml b/docs/xml/Android.Icu.Text/AlphabeticIndex+Bucket.xml
index 5eb75c2e1..31fe495e3 100644
--- a/docs/xml/Android.Icu.Text/AlphabeticIndex+Bucket.xml
+++ b/docs/xml/Android.Icu.Text/AlphabeticIndex+Bucket.xml
@@ -121,9 +121,11 @@
- To be added.
- To be added.
+ Is a normal, underflow, overflow, or inflow bucket
+ is an underflow, overflow, or inflow bucket
+ Is a normal, underflow, overflow, or inflow bucket
+ Android reference for android.icu.text.AlphabeticIndex.Bucket.getLabelType.
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
@@ -161,7 +163,7 @@
Iterator over the records in the bucket
- To be added.
+ an Iterator.
Iterator over the records in the bucket
diff --git a/docs/xml/Android.Icu.Text/AlphabeticIndex+ImmutableIndex.xml b/docs/xml/Android.Icu.Text/AlphabeticIndex+ImmutableIndex.xml
index 9ad9a5ff8..94b31a0b2 100644
--- a/docs/xml/Android.Icu.Text/AlphabeticIndex+ImmutableIndex.xml
+++ b/docs/xml/Android.Icu.Text/AlphabeticIndex+ImmutableIndex.xml
@@ -136,10 +136,12 @@
- To be added.
- To be added.
- To be added.
+ bucket number
+ Returns the index-th bucket.
+ the index-th bucket
+ Returns the index-th bucket. Returns null if the index is out of range.
+ Android reference for android.icu.text.AlphabeticIndex.ImmutableIndex.getBucket.
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
@@ -272,10 +274,10 @@
- To be added
- To be added.
+ Returns an iterator over elements of type T.
+ an Iterator.
- To be added
+ Returns an iterator over elements of type T.
Java documentation for android.icu.text.AlphabeticIndex.ImmutableIndex.iterator().
diff --git a/docs/xml/Android.Icu.Text/AlphabeticIndex.xml b/docs/xml/Android.Icu.Text/AlphabeticIndex.xml
index ea89d29ab..11569089d 100644
--- a/docs/xml/Android.Icu.Text/AlphabeticIndex.xml
+++ b/docs/xml/Android.Icu.Text/AlphabeticIndex.xml
@@ -355,10 +355,12 @@
- To be added.
- To be added.
- To be added.
+ additional characters to add to the index, such as those in Swedish.
+ Add more index characters (aside from what are in the locale)
+ this, for chaining
+ Add more index characters (aside from what are in the locale)
+ Android reference for android.icu.text.AlphabeticIndex.addLabels.
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
@@ -401,10 +403,12 @@
- To be added.
- To be added.
- To be added.
+ additional characters to add to the index, such as those in Swedish.
+ Add more index characters (aside from what are in the locale)
+ this, for chaining
+ Add more index characters (aside from what are in the locale)
+ Android reference for android.icu.text.AlphabeticIndex.addLabels.
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
@@ -614,9 +618,11 @@
- To be added.
- To be added.
+ Builds an immutable, thread-safe version of this instance, without data records.
+ an immutable index instance
+ Builds an immutable, thread-safe version of this instance, without data records.
+ Android reference for android.icu.text.AlphabeticIndex.buildImmutableIndex.
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
diff --git a/docs/xml/Android.Icu.Text/BidiOptions.xml b/docs/xml/Android.Icu.Text/BidiOptions.xml
index a8e1d4e2c..b0f00ab67 100644
--- a/docs/xml/Android.Icu.Text/BidiOptions.xml
+++ b/docs/xml/Android.Icu.Text/BidiOptions.xml
@@ -40,7 +40,11 @@
126
- To be added.
+
+ Constant indicating that the base direction depends on the first strong directional character in the text according to the Unicode Bidirectional Algorithm. If no strong directional character is present, the base direction is left-to-right.
+ Android reference for android.icu.text.Bidi.DIRECTION_DEFAULT_LEFT_TO_RIGHT.
+ Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
+
@@ -68,7 +72,11 @@
127
- To be added.
+
+ Constant indicating that the base direction depends on the first strong directional character in the text according to the Unicode Bidirectional Algorithm. If no strong directional character is present, the base direction is right-to-left.
+ Android reference for android.icu.text.Bidi.DIRECTION_DEFAULT_RIGHT_TO_LEFT.
+ Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
+
@@ -96,7 +104,11 @@
0
- To be added.
+
+ Constant indicating base direction is left-to-right.
+ Android reference for android.icu.text.Bidi.DIRECTION_LEFT_TO_RIGHT.
+ Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
+
@@ -124,7 +136,11 @@
1
- To be added.
+
+ Constant indicating base direction is right-to-left.
+ Android reference for android.icu.text.Bidi.DIRECTION_RIGHT_TO_LEFT.
+ Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
+
@@ -152,7 +168,11 @@
-1
- To be added.
+
+ Special value which can be returned by the mapping methods when a logical index has no corresponding visual index or vice-versa. This may happen for the logical-to-visual mapping of a Bidi control when option OPTION_REMOVE_CONTROLS is specified. This can also happen for the visual-to-logical mapping of a Bidi mark (LRM or RLM) inserted by option OPTION_INSERT_MARKS.
+ Android reference for android.icu.text.Bidi.MAP_NOWHERE.
+ Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
+
@@ -180,7 +200,11 @@
0
- To be added.
+
+ Option value for setReorderingOptions: disable all the options which can be set with this method
+ Android reference for android.icu.text.Bidi.OPTION_DEFAULT.
+ Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
+
@@ -208,7 +232,11 @@
1
- To be added.
+
+ Option bit for setReorderingOptions: insert Bidi marks (LRM or RLM) when needed to ensure correct result of a reordering to a Logical order This option must be set or reset before calling setPara. This option is significant only with reordering modes which generate a result with Logical order, specifically. REORDER_RUNS_ONLY REORDER_INVERSE_NUMBERS_AS_L REORDER_INVERSE_LIKE_DIRECT REORDER_INVERSE_FOR_NUMBERS_SPECIAL If this option is set in conjunction with reordering mode REORDER_INVERSE_NUMBERS_AS_L or with calling setInverse(true), it implies option INSERT_LRM_FOR_NUMERIC in calls to method writeReordered(). For other reordering modes, a minimum number of LRM or RLM characters will be added to the source text after reordering it so as to ensure round trip, i.e. when applying the inverse reordering mode on the resulting logical text with removal of Bidi marks (option OPTION_REMOVE_CONTROLS set before calling setPara() or option REMOVE_BIDI_CONTROLS in writeReordered ), the result will be identical to the source text in the first transformation. This option will be ignored if specified together with option OPTION_REMOVE_CONTROLS. It inhibits option REMOVE_BIDI_CONTROLS in calls to method writeReordered() and it implies option INSERT_LRM_FOR_NUMERIC in calls to method writeReordered() if the reordering mode is REORDER_INVERSE_NUMBERS_AS_L.
+ Android reference for android.icu.text.Bidi.OPTION_INSERT_MARKS.
+ Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
+
@@ -236,7 +264,11 @@
2
- To be added.
+
+ Option bit for setReorderingOptions: remove Bidi control characters This option must be set or reset before calling setPara. This option nullifies option OPTION_INSERT_MARKS. It inhibits option INSERT_LRM_FOR_NUMERIC in calls to method writeReordered() and it implies option REMOVE_BIDI_CONTROLS in calls to that method.
+ Android reference for android.icu.text.Bidi.OPTION_REMOVE_CONTROLS.
+ Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
+
@@ -264,7 +296,11 @@
4
- To be added.
+
+ Option bit for setReorderingOptions: process the output as part of a stream to be continued This option must be set or reset before calling setPara. This option specifies that the caller is interested in processing large text object in parts. The results of the successive calls are expected to be concatenated by the caller. Only the call for the last part will have this option bit off. When this option bit is on, setPara() may process less than the full source text in order to truncate the text at a meaningful boundary. The caller should call getProcessedLength() immediately after calling setPara() in order to determine how much of the source text has been processed. Source text beyond that length should be resubmitted in following calls to setPara. The processed length may be less than the length of the source text if a character preceding the last character of the source text constitutes a reasonable boundary (like a block separator) for text to be continued. If the last character of the source text constitutes a reasonable boundary, the whole text will be processed at once. If nowhere in the source text there exists such a reasonable boundary, the processed length will be zero. The caller should check for such an occurrence and do one of the following: submit a larger amount of text with a better chance to include a reasonable boundary. resubmit the same text after turning off option OPTION_STREAMING. In all cases, this option should be turned off before processing the last part of the text. When the OPTION_STREAMING option is used, it is recommended to call orderParagraphsLTR(true) before calling setPara() so that later paragraphs may be concatenated to previous paragraphs on the right.
+ Android reference for android.icu.text.Bidi.OPTION_STREAMING.
+ Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
+
diff --git a/docs/xml/Android.Icu.Text/BreakIterator.xml b/docs/xml/Android.Icu.Text/BreakIterator.xml
index ba34c52c3..6d3aa4a81 100644
--- a/docs/xml/Android.Icu.Text/BreakIterator.xml
+++ b/docs/xml/Android.Icu.Text/BreakIterator.xml
@@ -2001,9 +2001,11 @@
Java.Text.ICharacterIterator
- To be added.
- To be added.
+ Returns a CharacterIterator over the text being analyzed.
+ A CharacterIterator over the text being analyzed.
+ Returns a CharacterIterator over the text being analyzed. Caution: The state of the returned CharacterIterator must not be modified in any way while the BreakIterator is still in use. Doing so will lead to undefined behavior of the BreakIterator. Clone the returned CharacterIterator first and work with that. The returned CharacterIterator is a reference to the actual iterator being used by the BreakIterator. No guarantees are made about the current position of this iterator when it is returned; it may differ from the BreakIterators current position. If you need to move that position to examine the text, clone this function's return value first.
+ Android reference for android.icu.text.BreakIterator.getText.
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
diff --git a/docs/xml/Android.Icu.Text/BreakKind.xml b/docs/xml/Android.Icu.Text/BreakKind.xml
index f29a89944..be7c27627 100644
--- a/docs/xml/Android.Icu.Text/BreakKind.xml
+++ b/docs/xml/Android.Icu.Text/BreakKind.xml
@@ -42,9 +42,12 @@
0
- To be added.
+
+ [icu]
+ Android reference for android.icu.text.BreakIterator.KIND_CHARACTER.
+ Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
+
- Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
@@ -73,9 +76,12 @@
2
- To be added.
+
+ [icu]
+ Android reference for android.icu.text.BreakIterator.KIND_LINE.
+ Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
+
- Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
@@ -104,9 +110,12 @@
3
- To be added.
+
+ [icu]
+ Android reference for android.icu.text.BreakIterator.KIND_SENTENCE.
+ Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
+
- Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
@@ -135,9 +144,13 @@
4
- To be added.
+
+ This constant was deprecated in API level 29. ICU 64 Use getWordInstance() instead.
+ [icu]
+ Android reference for android.icu.text.BreakIterator.KIND_TITLE.
+ Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
+
- Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
@@ -166,9 +179,12 @@
1
- To be added.
+
+ [icu]
+ Android reference for android.icu.text.BreakIterator.KIND_WORD.
+ Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
+
- Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
diff --git a/docs/xml/Android.Icu.Text/BreakWord.xml b/docs/xml/Android.Icu.Text/BreakWord.xml
index da41bd0bd..7454dcbf6 100644
--- a/docs/xml/Android.Icu.Text/BreakWord.xml
+++ b/docs/xml/Android.Icu.Text/BreakWord.xml
@@ -42,9 +42,12 @@
400
- To be added.
+
+ Tag value for words containing ideographic characters, lower limit
+ Android reference for android.icu.text.BreakIterator.WORD_IDEO.
+ Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
+
- Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
@@ -73,9 +76,12 @@
500
- To be added.
+
+ Tag value for words containing ideographic characters, upper limit
+ Android reference for android.icu.text.BreakIterator.WORD_IDEO_LIMIT.
+ Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
+
- Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
@@ -104,9 +110,12 @@
300
- To be added.
+
+ Tag value for words containing kana characters, lower limit
+ Android reference for android.icu.text.BreakIterator.WORD_KANA.
+ Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
+
- Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
@@ -135,9 +144,12 @@
400
- To be added.
+
+ Tag value for words containing kana characters, upper limit
+ Android reference for android.icu.text.BreakIterator.WORD_KANA_LIMIT.
+ Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
+
- Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
@@ -166,9 +178,12 @@
200
- To be added.
+
+ Tag value for words that contain letters, excluding hiragana, katakana or ideographic characters, lower limit.
+ Android reference for android.icu.text.BreakIterator.WORD_LETTER.
+ Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
+
- Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
@@ -197,9 +212,12 @@
300
- To be added.
+
+ Tag value for words containing letters, upper limit
+ Android reference for android.icu.text.BreakIterator.WORD_LETTER_LIMIT.
+ Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
+
- Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
@@ -228,9 +246,12 @@
0
- To be added.
+
+ Tag value for "words" that do not fit into any of other categories. Includes spaces and most punctuation.
+ Android reference for android.icu.text.BreakIterator.WORD_NONE.
+ Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
+
- Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
@@ -259,9 +280,12 @@
100
- To be added.
+
+ Upper bound for tags for uncategorized words.
+ Android reference for android.icu.text.BreakIterator.WORD_NONE_LIMIT.
+ Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
+
- Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
@@ -290,9 +314,12 @@
100
- To be added.
+
+ Tag value for words that appear to be numbers, lower limit.
+ Android reference for android.icu.text.BreakIterator.WORD_NUMBER.
+ Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
+
- Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
@@ -321,9 +348,12 @@
200
- To be added.
+
+ Tag value for words that appear to be numbers, upper limit.
+ Android reference for android.icu.text.BreakIterator.WORD_NUMBER_LIMIT.
+ Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
+
- Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
diff --git a/docs/xml/Android.Icu.Text/CaseMap+Fold.xml b/docs/xml/Android.Icu.Text/CaseMap+Fold.xml
index 65cd08c3f..4b8432bd3 100644
--- a/docs/xml/Android.Icu.Text/CaseMap+Fold.xml
+++ b/docs/xml/Android.Icu.Text/CaseMap+Fold.xml
@@ -312,9 +312,13 @@
- To be added.
- To be added.
- To be added.
+ Returns an instance that behaves like this one but omits unchanged text when case-mapping with Edits.
+ an options object with this option.
+
+ Returns an instance that behaves like this one but omits unchanged text when case-mapping with Edits.
+ Android reference for android.icu.text.CaseMap.Fold.omitUnchangedText.
+ Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
+
@@ -408,9 +412,13 @@
- To be added.
- To be added.
- To be added.
+ Returns an instance that behaves like this one but handles dotted I and dotless i appropriately for Turkic languages (tr, az).
+ an options object with this option.
+
+ Returns an instance that behaves like this one but handles dotted I and dotless i appropriately for Turkic languages (tr, az). Uses the Unicode CaseFolding.txt mappings marked with 'T' that are to be excluded for default mappings and included for the Turkic-specific mappings.
+ Android reference for android.icu.text.CaseMap.Fold.turkic.
+ Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
+
diff --git a/docs/xml/Android.Icu.Text/CaseMap+Lower.xml b/docs/xml/Android.Icu.Text/CaseMap+Lower.xml
index 9d0d22649..6cb9ec3be 100644
--- a/docs/xml/Android.Icu.Text/CaseMap+Lower.xml
+++ b/docs/xml/Android.Icu.Text/CaseMap+Lower.xml
@@ -324,9 +324,13 @@
- To be added.
- To be added.
- To be added.
+ Returns an instance that behaves like this one but omits unchanged text when case-mapping with Edits.
+ an options object with this option.
+
+ Returns an instance that behaves like this one but omits unchanged text when case-mapping with Edits.
+ Android reference for android.icu.text.CaseMap.Lower.omitUnchangedText.
+ Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
+
diff --git a/docs/xml/Android.Icu.Text/CaseMap+Title.xml b/docs/xml/Android.Icu.Text/CaseMap+Title.xml
index a1fba3526..31f3f983d 100644
--- a/docs/xml/Android.Icu.Text/CaseMap+Title.xml
+++ b/docs/xml/Android.Icu.Text/CaseMap+Title.xml
@@ -71,9 +71,13 @@
- To be added.
- To be added.
- To be added.
+ Returns an instance that behaves like this one but adjusts each titlecasing BreakIterator index to the next cased character.
+ an options object with this option.
+
+ Returns an instance that behaves like this one but adjusts each titlecasing BreakIterator index to the next cased character. (See the Unicode Standard, chapter 3, Default Case Conversion, R3 toTitlecase(X).) This used to be the default index adjustment in ICU. Since ICU 60, the default index adjustment is to the next character that is a letter, number, symbol, or private use code point. (Uncased modifier letters are skipped.) The difference in behavior is small for word titlecasing, but the new adjustment is much better for whole-string and sentence titlecasing: It yields "49ers" and "«丰(abc)»" instead of "49Ers" and "«丰(Abc)»". It is an error to specify multiple titlecasing adjustment options together.
+ Android reference for android.icu.text.CaseMap.Title.adjustToCased.
+ Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
+
@@ -382,9 +386,13 @@
- To be added.
- To be added.
- To be added.
+ Returns an instance that behaves like this one but does not adjust the titlecasing BreakIterator indexes; titlecases exactly the characters at breaks from the iterator.
+ an options object with this option.
+
+ Returns an instance that behaves like this one but does not adjust the titlecasing BreakIterator indexes; titlecases exactly the characters at breaks from the iterator. By default, titlecasing will take each break iterator index, adjust it to the next relevant character (see adjustToCased() ), and titlecase that one. Other characters are lowercased.
+ Android reference for android.icu.text.CaseMap.Title.noBreakAdjustment.
+ Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
+
@@ -412,9 +420,12 @@
- To be added.
- To be added.
- To be added.
+ Returns an instance that behaves like this one but does not lowercase non-initial parts of words when titlecasing.
+ an options object with this option.
+ To be added.
+ Android reference for android.icu.text.CaseMap.Title.noLowercase.
+ Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
+
@@ -442,9 +453,13 @@
- To be added.
- To be added.
- To be added.
+ Returns an instance that behaves like this one but omits unchanged text when case-mapping with Edits.
+ an options object with this option.
+
+ Returns an instance that behaves like this one but omits unchanged text when case-mapping with Edits.
+ Android reference for android.icu.text.CaseMap.Title.omitUnchangedText.
+ Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
+
@@ -472,9 +487,13 @@
- To be added.
- To be added.
- To be added.
+ Returns an instance that behaves like this one but titlecases sentences rather than words.
+ an options object with this option.
+
+ Returns an instance that behaves like this one but titlecases sentences rather than words. (Titlecases only the first character of each sentence, possibly adjusted.) It is an error to specify multiple titlecasing iterator options together, including both an option and an explicit BreakIterator.
+ Android reference for android.icu.text.CaseMap.Title.sentences.
+ Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
+
@@ -568,9 +587,13 @@
- To be added.
- To be added.
- To be added.
+ Returns an instance that behaves like this one but titlecases the string as a whole rather than each word.
+ an options object with this option.
+
+ Returns an instance that behaves like this one but titlecases the string as a whole rather than each word. (Titlecases only the character at index 0, possibly adjusted.) It is an error to specify multiple titlecasing iterator options together, including both an option and an explicit BreakIterator.
+ Android reference for android.icu.text.CaseMap.Title.wholeString.
+ Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
+
diff --git a/docs/xml/Android.Icu.Text/CaseMap+Upper.xml b/docs/xml/Android.Icu.Text/CaseMap+Upper.xml
index 6a287f59a..d77b90bbb 100644
--- a/docs/xml/Android.Icu.Text/CaseMap+Upper.xml
+++ b/docs/xml/Android.Icu.Text/CaseMap+Upper.xml
@@ -324,9 +324,13 @@
- To be added.
- To be added.
- To be added.
+ Returns an instance that behaves like this one but omits unchanged text when case-mapping with Edits.
+ an options object with this option.
+
+ Returns an instance that behaves like this one but omits unchanged text when case-mapping with Edits.
+ Android reference for android.icu.text.CaseMap.Upper.omitUnchangedText.
+ Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
+
diff --git a/docs/xml/Android.Icu.Text/CollationKeyBoundMode.xml b/docs/xml/Android.Icu.Text/CollationKeyBoundMode.xml
index 2b6628254..458033a89 100644
--- a/docs/xml/Android.Icu.Text/CollationKeyBoundMode.xml
+++ b/docs/xml/Android.Icu.Text/CollationKeyBoundMode.xml
@@ -42,9 +42,12 @@
0
- To be added.
+
+ Lower bound
+ Android reference for android.icu.text.CollationKey.BoundMode.LOWER.
+ Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
+
- Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
@@ -73,9 +76,12 @@
1
- To be added.
+
+ Upper bound that will match strings of exact size
+ Android reference for android.icu.text.CollationKey.BoundMode.UPPER.
+ Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
+
- Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
@@ -104,9 +110,12 @@
2
- To be added.
+
+ Upper bound that will match all the strings that have the same initial substring as the given string
+ Android reference for android.icu.text.CollationKey.BoundMode.UPPER_LONG.
+ Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
+
- Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
diff --git a/docs/xml/Android.Icu.Text/CollationStrength.xml b/docs/xml/Android.Icu.Text/CollationStrength.xml
index 209022c89..d39c372bf 100644
--- a/docs/xml/Android.Icu.Text/CollationStrength.xml
+++ b/docs/xml/Android.Icu.Text/CollationStrength.xml
@@ -42,9 +42,12 @@
15
- To be added.
+
+ Smallest Collator strength value. When all other strengths are equal, the IDENTICAL strength is used as a tiebreaker. The Unicode code point values of the NFD form of each string are compared, just in case there is no difference. See class documentation for more explanation. Note this value is different from JDK's
+ Android reference for android.icu.text.Collator.IDENTICAL.
+ Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
+
- Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
@@ -73,9 +76,12 @@
0
- To be added.
+
+ Strongest collator strength value. Typically used to denote differences between base characters. See class documentation for more explanation.
+ Android reference for android.icu.text.Collator.PRIMARY.
+ Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
+
- Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
@@ -104,9 +110,12 @@
3
- To be added.
+
+ [icu] Fourth level collator strength value. When punctuation is ignored (see Ignoring Punctuation in the User Guide ) at PRIMARY to TERTIARY strength, an additional strength level can be used to distinguish words with and without punctuation. See class documentation for more explanation.
+ Android reference for android.icu.text.Collator.QUATERNARY.
+ Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
+
- Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
@@ -135,9 +144,12 @@
1
- To be added.
+
+ Second level collator strength value. Accents in the characters are considered secondary differences. Other differences between letters can also be considered secondary differences, depending on the language. See class documentation for more explanation.
+ Android reference for android.icu.text.Collator.SECONDARY.
+ Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
+
- Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
@@ -166,9 +178,12 @@
2
- To be added.
+
+ Third level collator strength value. Upper and lower case differences in characters are distinguished at this strength level. In addition, a variant of a letter differs from the base form on the tertiary level. See class documentation for more explanation.
+ Android reference for android.icu.text.Collator.TERTIARY.
+ Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
+
- Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
diff --git a/docs/xml/Android.Icu.Text/Collator.xml b/docs/xml/Android.Icu.Text/Collator.xml
index 6b6ce30fd..c8e9b9d91 100644
--- a/docs/xml/Android.Icu.Text/Collator.xml
+++ b/docs/xml/Android.Icu.Text/Collator.xml
@@ -2482,9 +2482,11 @@
Android.Icu.Util.VersionInfo
- To be added.
- To be added.
+ [icu] Returns the UCA version of this collator object.
+ the version object associated with this collator
+ [icu] Returns the UCA version of this collator object.
+ Android reference for android.icu.text.Collator.getUCAVersion.
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
@@ -2513,9 +2515,11 @@
System.Int32
- To be added.
- To be added.
+ [icu] Gets the variable top value of a Collator.
+ the variable top primary weight
+ [icu] Gets the variable top value of a Collator.
+ Android reference for android.icu.text.Collator.getVariableTop.
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
@@ -2544,9 +2548,11 @@
Android.Icu.Util.VersionInfo
- To be added.
- To be added.
+ [icu] Returns the version of this collator object.
+ the version object associated with this collator
+ [icu] Returns the version of this collator object.
+ Android reference for android.icu.text.Collator.getVersion.
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
diff --git a/docs/xml/Android.Icu.Text/CollatorDecompositionMode.xml b/docs/xml/Android.Icu.Text/CollatorDecompositionMode.xml
index e28ae850a..c67a4aa19 100644
--- a/docs/xml/Android.Icu.Text/CollatorDecompositionMode.xml
+++ b/docs/xml/Android.Icu.Text/CollatorDecompositionMode.xml
@@ -42,9 +42,12 @@
17
- To be added.
+
+ Decomposition mode value. With CANONICAL_DECOMPOSITION set, characters that are canonical variants according to the Unicode standard will be decomposed for collation. CANONICAL_DECOMPOSITION corresponds to Normalization Form D as described in Unicode Technical Report #15.
+ Android reference for android.icu.text.Collator.CANONICAL_DECOMPOSITION.
+ Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
+
- Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
@@ -73,9 +76,12 @@
15
- To be added.
+
+ [icu] Note: This is for backwards compatibility with Java APIs only. It should not be used, IDENTICAL should be used instead. ICU's collation does not support Java's FULL_DECOMPOSITION mode.
+ Android reference for android.icu.text.Collator.FULL_DECOMPOSITION.
+ Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
+
- Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
@@ -104,9 +110,12 @@
16
- To be added.
+
+ Decomposition mode value. With NO_DECOMPOSITION set, Strings will not be decomposed for collation. This is the default decomposition setting unless otherwise specified by the locale used to create the Collator. Note this value is different from the JDK's.
+ Android reference for android.icu.text.Collator.NO_DECOMPOSITION.
+ Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
+
- Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
diff --git a/docs/xml/Android.Icu.Text/CompactDecimalFormat.xml b/docs/xml/Android.Icu.Text/CompactDecimalFormat.xml
index 83ac1ca1f..298704b77 100644
--- a/docs/xml/Android.Icu.Text/CompactDecimalFormat.xml
+++ b/docs/xml/Android.Icu.Text/CompactDecimalFormat.xml
@@ -125,11 +125,13 @@
- To be added.
- To be added.
- To be added.
+ the desired locale
+ the compact style
+ NOTE: New users are strongly encouraged to use NumberFormatter instead of NumberFormat.
To be added.
+ NOTE: New users are strongly encouraged to use NumberFormatter instead of NumberFormat. Creates a CompactDecimalFormat appropriate for a locale. The result may be affected by the number system in the locale, such as ar-u-nu-latn.
+ Android reference for android.icu.text.CompactDecimalFormat.getInstance.
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
@@ -166,11 +168,13 @@
- To be added.
- To be added.
- To be added.
+ the desired locale
+ the compact style
+ NOTE: New users are strongly encouraged to use NumberFormatter instead of NumberFormat.
To be added.
+ NOTE: New users are strongly encouraged to use NumberFormatter instead of NumberFormat. Creates a CompactDecimalFormat appropriate for a locale. The result may be affected by the number system in the locale, such as ar-u-nu-latn.
+ Android reference for android.icu.text.CompactDecimalFormat.getInstance.
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
diff --git a/docs/xml/Android.Icu.Text/ConstrainedFieldPosition.xml b/docs/xml/Android.Icu.Text/ConstrainedFieldPosition.xml
index ccf74650c..63cea947b 100644
--- a/docs/xml/Android.Icu.Text/ConstrainedFieldPosition.xml
+++ b/docs/xml/Android.Icu.Text/ConstrainedFieldPosition.xml
@@ -193,9 +193,13 @@
- To be added.
- To be added.
- To be added.
+ The field to fix when iterating.
+ Sets a constraint on the field.
+
+ Sets a constraint on the field. When this instance of ConstrainedFieldPosition is passed to FormattedValue.nextPosition, positions are skipped unless they have the given field. Any previously set constraints are cleared. For example, to loop over all grouping separators: Changing the constraint while in the middle of iterating over a FormattedValue does not generally have well-defined behavior.
+ Android reference for android.icu.text.ConstrainedFieldPosition.constrainField.
+ Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
+
@@ -222,9 +226,12 @@
Java.Text._Format+Field
- To be added.
- To be added.
- To be added.
+ Gets the field for the current position.
+ The field saved in the instance. See above for null conditions.
+ To be added.
+ Android reference for android.icu.text.ConstrainedFieldPosition.getField.
+ Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
+
@@ -437,11 +444,15 @@
- To be added.
- To be added.
- To be added.
- To be added.
- To be added.
+ The field to test.
+ The field value to test. Should be null if there is no value.
+ Determines whether a given field and value should be included given the constraints.
+ Whether the field should be included given the constraints.
+
+ Determines whether a given field and value should be included given the constraints. Intended to be used by FormattedValue implementations.
+ Android reference for android.icu.text.ConstrainedFieldPosition.matchesField.
+ Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
+
@@ -517,12 +528,15 @@
- To be added.
- To be added.
- To be added.
- To be added.
- To be added.
- To be added.
+ The new field.
+ The new field value. Should be null if there is no value.
+ The new inclusive start index.
+ The new exclusive end index.
+ Sets new values for the primary public getters.
+ To be added.
+ Android reference for android.icu.text.ConstrainedFieldPosition.setState.
+ Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
+
diff --git a/docs/xml/Android.Icu.Text/CurrencyPluralInfo.xml b/docs/xml/Android.Icu.Text/CurrencyPluralInfo.xml
index c1cc10118..f435cd5a8 100644
--- a/docs/xml/Android.Icu.Text/CurrencyPluralInfo.xml
+++ b/docs/xml/Android.Icu.Text/CurrencyPluralInfo.xml
@@ -243,7 +243,7 @@
Standard override
- To be added.
+ a clone of this instance.
Standard override
diff --git a/docs/xml/Android.Icu.Text/CurrencySpacing.xml b/docs/xml/Android.Icu.Text/CurrencySpacing.xml
index 45dc744ba..4e66187d9 100644
--- a/docs/xml/Android.Icu.Text/CurrencySpacing.xml
+++ b/docs/xml/Android.Icu.Text/CurrencySpacing.xml
@@ -42,9 +42,12 @@
0
- To be added.
+
+ [icu] Indicates the currency match pattern used in getPatternForCurrencySpacing(int, boolean).
+ Android reference for android.icu.text.DecimalFormatSymbols.CURRENCY_SPC_CURRENCY_MATCH.
+ Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
+
- Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
@@ -73,9 +76,12 @@
2
- To be added.
+
+ [icu] Indicates the insertion value used in getPatternForCurrencySpacing(int, boolean).
+ Android reference for android.icu.text.DecimalFormatSymbols.CURRENCY_SPC_INSERT.
+ Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
+
- Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
@@ -104,9 +110,12 @@
1
- To be added.
+
+ [icu] Indicates the surrounding match pattern used in getPatternForCurrencySpacing(int, boolean).
+ Android reference for android.icu.text.DecimalFormatSymbols.CURRENCY_SPC_SURROUNDING_MATCH.
+ Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
+
- Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
diff --git a/docs/xml/Android.Icu.Text/DateFormat+Field.xml b/docs/xml/Android.Icu.Text/DateFormat+Field.xml
index 8ee34f418..d78f4df32 100644
--- a/docs/xml/Android.Icu.Text/DateFormat+Field.xml
+++ b/docs/xml/Android.Icu.Text/DateFormat+Field.xml
@@ -822,10 +822,12 @@
- To be added.
- To be added.
- To be added.
+ Calendar field constant
+ Returns the Field constant that corresponds to the Calendar field calendarField.
+ Field associated with the calendarField, or null if no associated Field is available.
+ Returns the Field constant that corresponds to the Calendar field calendarField. If there is no corresponding Field is available, null is returned.
+ Android reference for android.icu.text.DateFormat.Field.ofCalendarField.
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
diff --git a/docs/xml/Android.Icu.Text/DateFormat.xml b/docs/xml/Android.Icu.Text/DateFormat.xml
index 5ccec2ae0..157e094f2 100644
--- a/docs/xml/Android.Icu.Text/DateFormat.xml
+++ b/docs/xml/Android.Icu.Text/DateFormat.xml
@@ -1769,9 +1769,11 @@
To be added.
- To be added.
+ Returns the current value for the specified BooleanAttribute for this instance if attribute is missing false is returned.
To be added.
+ Returns the current value for the specified BooleanAttribute for this instance if attribute is missing false is returned.
+ Android reference for android.icu.text.DateFormat.getBooleanAttribute.
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
@@ -1803,10 +1805,12 @@
- To be added.
- To be added.
- To be added.
+ the DisplayContext.Type whose value to return
+ [icu] Get the formatter's DisplayContext value for the specified DisplayContext.Type, such as CAPITALIZATION.
+ the current DisplayContext setting for the specified type
+ [icu] Get the formatter's DisplayContext value for the specified DisplayContext.Type, such as CAPITALIZATION.
+ Android reference for android.icu.text.DateFormat.getContext.
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
@@ -5258,10 +5262,10 @@
- To be added.
- To be added.
+ A String, part of which should be parsed.
+ A ParsePosition object with index and error index information as described above.
Parses a date/time string into an Object.
- To be added.
+ An Object parsed from the string. In case of error, returns null.
Parses a date/time string into an Object. This convenience method simply
calls parse(String, ParsePosition).
@@ -5761,9 +5765,11 @@
To be added.
To be added.
- To be added.
+ Sets a boolean attribute for this instance.
To be added.
+ Sets a boolean attribute for this instance. Aspects of DateFormat leniency are controlled by boolean attributes.
+ Android reference for android.icu.text.DateFormat.setBooleanAttribute.
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
diff --git a/docs/xml/Android.Icu.Text/DateFormatField.xml b/docs/xml/Android.Icu.Text/DateFormatField.xml
index fdf90c14f..3e14ae22d 100644
--- a/docs/xml/Android.Icu.Text/DateFormatField.xml
+++ b/docs/xml/Android.Icu.Text/DateFormatField.xml
@@ -42,9 +42,12 @@
14
- To be added.
+
+ FieldPosition selector for 'a' field alignment, corresponding to the Calendar.AM_PM field.
+ Android reference for android.icu.text.DateFormat.AM_PM_FIELD.
+ Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
+
- Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
@@ -73,7 +76,11 @@
35
- To be added.
+
+ [icu] FieldPosition selector for 'b' field alignment. No related Calendar field. This displays the fixed day period (am/pm/midnight/noon).
+ Android reference for android.icu.text.DateFormat.AM_PM_MIDNIGHT_NOON_FIELD.
+ Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
+
@@ -101,9 +108,12 @@
3
- To be added.
+
+ FieldPosition selector for 'd' field alignment, corresponding to the Calendar.DATE field.
+ Android reference for android.icu.text.DateFormat.DATE_FIELD.
+ Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
+
- Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
@@ -132,9 +142,12 @@
9
- To be added.
+
+ FieldPosition selector for 'E' field alignment, corresponding to the Calendar.DAY_OF_WEEK field.
+ Android reference for android.icu.text.DateFormat.DAY_OF_WEEK_FIELD.
+ Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
+
- Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
@@ -163,9 +176,12 @@
11
- To be added.
+
+ FieldPosition selector for 'F' field alignment, corresponding to the Calendar.DAY_OF_WEEK_IN_MONTH field.
+ Android reference for android.icu.text.DateFormat.DAY_OF_WEEK_IN_MONTH_FIELD.
+ Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
+
- Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
@@ -194,9 +210,12 @@
10
- To be added.
+
+ FieldPosition selector for 'D' field alignment, corresponding to the Calendar.DAY_OF_YEAR field.
+ Android reference for android.icu.text.DateFormat.DAY_OF_YEAR_FIELD.
+ Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
+
- Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
@@ -225,9 +244,12 @@
19
- To be added.
+
+ [icu] FieldPosition selector for 'e' field alignment, corresponding to the Calendar.DOW_LOCAL field.
+ Android reference for android.icu.text.DateFormat.DOW_LOCAL_FIELD.
+ Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
+
- Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
@@ -256,9 +278,12 @@
0
- To be added.
+
+ FieldPosition selector for 'G' field alignment, corresponding to the Calendar.ERA field.
+ Android reference for android.icu.text.DateFormat.ERA_FIELD.
+ Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
+
- Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
@@ -287,9 +312,12 @@
20
- To be added.
+
+ [icu] FieldPosition selector for 'u' field alignment, corresponding to the Calendar.EXTENDED_YEAR field.
+ Android reference for android.icu.text.DateFormat.EXTENDED_YEAR_FIELD.
+ Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
+
- Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
@@ -318,7 +346,11 @@
36
- To be added.
+
+ [icu] FieldPosition selector for 'B' field alignment. No related Calendar field. This displays the flexible day period.
+ Android reference for android.icu.text.DateFormat.FLEXIBLE_DAY_PERIOD_FIELD.
+ Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
+
@@ -346,9 +378,12 @@
8
- To be added.
+
+ [icu] FieldPosition selector for 'S' field alignment, corresponding to the Calendar.MILLISECOND field. Note: Time formats that use 'S' can display a maximum of three significant digits for fractional seconds, corresponding to millisecond resolution and a fractional seconds sub-pattern of SSS. If the sub-pattern is S or SS, the fractional seconds value will be truncated (not rounded) to the number of display places specified. If the fractional seconds sub-pattern is longer than SSS, the additional display places will be filled with zeros.
+ Android reference for android.icu.text.DateFormat.FRACTIONAL_SECOND_FIELD.
+ Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
+
- Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
@@ -377,9 +412,12 @@
16
- To be added.
+
+ FieldPosition selector for 'K' field alignment, corresponding to the Calendar.HOUR field. HOUR0_FIELD is used for the zero-based 12-hour clock. For example, 11:30 PM + 1 hour results in 00:30 AM.
+ Android reference for android.icu.text.DateFormat.HOUR0_FIELD.
+ Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
+
- Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
@@ -408,9 +446,12 @@
15
- To be added.
+
+ FieldPosition selector for 'h' field alignment, corresponding to the Calendar.HOUR field. HOUR1_FIELD is used for the one-based 12-hour clock. For example, 11:30 PM + 1 hour results in 12:30 AM.
+ Android reference for android.icu.text.DateFormat.HOUR1_FIELD.
+ Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
+
- Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
@@ -439,9 +480,12 @@
5
- To be added.
+
+ FieldPosition selector for 'H' field alignment, corresponding to the Calendar.HOUR_OF_DAY field. HOUR_OF_DAY0_FIELD is used for the zero-based 24-hour clock. For example, 23:59 + 01:00 results in 00:59.
+ Android reference for android.icu.text.DateFormat.HOUR_OF_DAY0_FIELD.
+ Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
+
- Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
@@ -470,9 +514,12 @@
4
- To be added.
+
+ FieldPosition selector for 'k' field alignment, corresponding to the Calendar.HOUR_OF_DAY field. HOUR_OF_DAY1_FIELD is used for the one-based 24-hour clock. For example, 23:59 + 01:00 results in 24:59.
+ Android reference for android.icu.text.DateFormat.HOUR_OF_DAY1_FIELD.
+ Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
+
- Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
@@ -501,9 +548,12 @@
21
- To be added.
+
+ [icu] FieldPosition selector for 'g' field alignment, corresponding to the Calendar.JULIAN_DAY field.
+ Android reference for android.icu.text.DateFormat.JULIAN_DAY_FIELD.
+ Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
+
- Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
@@ -532,9 +582,12 @@
8
- To be added.
+
+ Alias for FRACTIONAL_SECOND_FIELD.
+ Android reference for android.icu.text.DateFormat.MILLISECOND_FIELD.
+ Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
+
- Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
@@ -563,9 +616,12 @@
22
- To be added.
+
+ [icu] FieldPosition selector for 'A' field alignment, corresponding to the Calendar.MILLISECONDS_IN_DAY field.
+ Android reference for android.icu.text.DateFormat.MILLISECONDS_IN_DAY_FIELD.
+ Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
+
- Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
@@ -594,9 +650,12 @@
6
- To be added.
+
+ FieldPosition selector for 'm' field alignment, corresponding to the Calendar.MINUTE field.
+ Android reference for android.icu.text.DateFormat.MINUTE_FIELD.
+ Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
+
- Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
@@ -625,9 +684,12 @@
2
- To be added.
+
+ FieldPosition selector for 'M' field alignment, corresponding to the Calendar.MONTH field.
+ Android reference for android.icu.text.DateFormat.MONTH_FIELD.
+ Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
+
- Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
@@ -656,9 +718,12 @@
27
- To be added.
+
+ [icu] FieldPosition selector for 'Q' field alignment, corresponding to the Calendar.MONTH field. This displays the quarter.
+ Android reference for android.icu.text.DateFormat.QUARTER_FIELD.
+ Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
+
- Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
@@ -687,9 +752,12 @@
7
- To be added.
+
+ FieldPosition selector for 's' field alignment, corresponding to the Calendar.SECOND field.
+ Android reference for android.icu.text.DateFormat.SECOND_FIELD.
+ Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
+
- Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
@@ -718,9 +786,12 @@
25
- To be added.
+
+ [icu] FieldPosition selector for 'c' field alignment, corresponding to the Calendar.DAY_OF_WEEK field. This displays the stand alone day name, if available.
+ Android reference for android.icu.text.DateFormat.STANDALONE_DAY_FIELD.
+ Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
+
- Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
@@ -749,9 +820,12 @@
26
- To be added.
+
+ [icu] FieldPosition selector for 'L' field alignment, corresponding to the Calendar.MONTH field. This displays the stand alone month name, if available.
+ Android reference for android.icu.text.DateFormat.STANDALONE_MONTH_FIELD.
+ Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
+
- Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
@@ -780,9 +854,12 @@
28
- To be added.
+
+ [icu] FieldPosition selector for 'q' field alignment, corresponding to the Calendar.MONTH field. This displays the stand alone quarter, if available.
+ Android reference for android.icu.text.DateFormat.STANDALONE_QUARTER_FIELD.
+ Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
+
- Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
@@ -811,9 +888,12 @@
17
- To be added.
+
+ FieldPosition selector for 'z' field alignment, corresponding to the Calendar.ZONE_OFFSET and Calendar.DST_OFFSET fields.
+ Android reference for android.icu.text.DateFormat.TIMEZONE_FIELD.
+ Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
+
- Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
@@ -842,9 +922,12 @@
24
- To be added.
+
+ [icu] FieldPosition selector for 'v' field alignment, corresponding to the Calendar.ZONE_OFFSET and Calendar.DST_OFFSET fields. This displays the generic zone name, if available.
+ Android reference for android.icu.text.DateFormat.TIMEZONE_GENERIC_FIELD.
+ Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
+
- Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
@@ -873,9 +956,12 @@
32
- To be added.
+
+ [icu] FieldPosition selector for 'X' field alignment, corresponding to the Calendar.ZONE_OFFSET and Calendar.DST_OFFSET fields. This displays the ISO 8601 local time offset format or UTC indicator ("Z").
+ Android reference for android.icu.text.DateFormat.TIMEZONE_ISO_FIELD.
+ Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
+
- Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
@@ -904,9 +990,12 @@
33
- To be added.
+
+ [icu] FieldPosition selector for 'x' field alignment, corresponding to the Calendar.ZONE_OFFSET and Calendar.DST_OFFSET fields. This displays the ISO 8601 local time offset format.
+ Android reference for android.icu.text.DateFormat.TIMEZONE_ISO_LOCAL_FIELD.
+ Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
+
- Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
@@ -935,9 +1024,12 @@
31
- To be added.
+
+ [icu] FieldPosition selector for 'O' field alignment, corresponding to the Calendar.ZONE_OFFSET and Calendar.DST_OFFSET fields. This displays the localized GMT format.
+ Android reference for android.icu.text.DateFormat.TIMEZONE_LOCALIZED_GMT_OFFSET_FIELD.
+ Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
+
- Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
@@ -966,9 +1058,12 @@
23
- To be added.
+
+ [icu] FieldPosition selector for 'Z' field alignment, corresponding to the Calendar.ZONE_OFFSET and Calendar.DST_OFFSET fields.
+ Android reference for android.icu.text.DateFormat.TIMEZONE_RFC_FIELD.
+ Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
+
- Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
@@ -997,9 +1092,12 @@
29
- To be added.
+
+ [icu] FieldPosition selector for 'V' field alignment, corresponding to the Calendar.ZONE_OFFSET and Calendar.DST_OFFSET fields. This displays the fallback timezone name when VVVV is specified, and the short standard or daylight timezone name ignoring commonlyUsed when a single V is specified.
+ Android reference for android.icu.text.DateFormat.TIMEZONE_SPECIAL_FIELD.
+ Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
+
- Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
@@ -1028,9 +1126,12 @@
13
- To be added.
+
+ FieldPosition selector for 'W' field alignment, corresponding to the Calendar.WEEK_OF_MONTH field.
+ Android reference for android.icu.text.DateFormat.WEEK_OF_MONTH_FIELD.
+ Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
+
- Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
@@ -1059,9 +1160,12 @@
12
- To be added.
+
+ FieldPosition selector for 'w' field alignment, corresponding to the Calendar.WEEK_OF_YEAR field.
+ Android reference for android.icu.text.DateFormat.WEEK_OF_YEAR_FIELD.
+ Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
+
- Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
@@ -1090,9 +1194,12 @@
1
- To be added.
+
+ FieldPosition selector for 'y' field alignment, corresponding to the Calendar.YEAR field.
+ Android reference for android.icu.text.DateFormat.YEAR_FIELD.
+ Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
+
- Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
@@ -1121,9 +1228,12 @@
30
- To be added.
+
+ [icu] FieldPosition selector for 'U' field alignment, corresponding to the Calendar.YEAR field. This displays the cyclic year name, if available.
+ Android reference for android.icu.text.DateFormat.YEAR_NAME_FIELD.
+ Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
+
- Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
@@ -1152,9 +1262,12 @@
18
- To be added.
+
+ [icu] FieldPosition selector for 'Y' field alignment, corresponding to the Calendar.YEAR_WOY field.
+ Android reference for android.icu.text.DateFormat.YEAR_WOY_FIELD.
+ Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
+
- Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
diff --git a/docs/xml/Android.Icu.Text/DateFormatStyle.xml b/docs/xml/Android.Icu.Text/DateFormatStyle.xml
index 4793540e1..fedfe351c 100644
--- a/docs/xml/Android.Icu.Text/DateFormatStyle.xml
+++ b/docs/xml/Android.Icu.Text/DateFormatStyle.xml
@@ -42,9 +42,12 @@
2
- To be added.
+
+ Constant for default style pattern. Its value is MEDIUM.
+ Android reference for android.icu.text.DateFormat.DEFAULT.
+ Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
+
- Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
@@ -73,9 +76,12 @@
0
- To be added.
+
+ Constant for full style pattern.
+ Android reference for android.icu.text.DateFormat.FULL.
+ Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
+
- Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
@@ -104,9 +110,12 @@
1
- To be added.
+
+ Constant for long style pattern.
+ Android reference for android.icu.text.DateFormat.LONG.
+ Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
+
- Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
@@ -135,9 +144,12 @@
2
- To be added.
+
+ Constant for medium style pattern.
+ Android reference for android.icu.text.DateFormat.MEDIUM.
+ Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
+
- Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
@@ -166,9 +178,12 @@
-1
- To be added.
+
+ [icu] Constant for empty style pattern.
+ Android reference for android.icu.text.DateFormat.NONE.
+ Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
+
- Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
@@ -197,9 +212,12 @@
128
- To be added.
+
+ [icu] Constant for relative style mask.
+ Android reference for android.icu.text.DateFormat.RELATIVE.
+ Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
+
- Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
@@ -228,9 +246,12 @@
130
- To be added.
+
+ [icu] Constant for relative default style pattern.
+ Android reference for android.icu.text.DateFormat.RELATIVE_DEFAULT.
+ Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
+
- Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
@@ -259,9 +280,12 @@
128
- To be added.
+
+ [icu] Constant for relative full style pattern.
+ Android reference for android.icu.text.DateFormat.RELATIVE_FULL.
+ Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
+
- Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
@@ -290,9 +314,12 @@
129
- To be added.
+
+ [icu] Constant for relative style pattern.
+ Android reference for android.icu.text.DateFormat.RELATIVE_LONG.
+ Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
+
- Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
@@ -321,9 +348,12 @@
130
- To be added.
+
+ [icu] Constant for relative style pattern.
+ Android reference for android.icu.text.DateFormat.RELATIVE_MEDIUM.
+ Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
+
- Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
@@ -352,9 +382,12 @@
131
- To be added.
+
+ [icu] Constant for relative style pattern.
+ Android reference for android.icu.text.DateFormat.RELATIVE_SHORT.
+ Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
+
- Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
@@ -383,9 +416,12 @@
3
- To be added.
+
+ Constant for short style pattern.
+ Android reference for android.icu.text.DateFormat.SHORT.
+ Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
+
- Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
diff --git a/docs/xml/Android.Icu.Text/DateFormatSymbolContext.xml b/docs/xml/Android.Icu.Text/DateFormatSymbolContext.xml
index 4932f1564..9dce7c2e2 100644
--- a/docs/xml/Android.Icu.Text/DateFormatSymbolContext.xml
+++ b/docs/xml/Android.Icu.Text/DateFormatSymbolContext.xml
@@ -42,9 +42,12 @@
0
- To be added.
+
+ [icu] Constant for context.
+ Android reference for android.icu.text.DateFormatSymbols.FORMAT.
+ Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
+
- Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
@@ -73,9 +76,12 @@
1
- To be added.
+
+ [icu] Constant for context.
+ Android reference for android.icu.text.DateFormatSymbols.STANDALONE.
+ Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
+
- Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
diff --git a/docs/xml/Android.Icu.Text/DateFormatSymbolWidth.xml b/docs/xml/Android.Icu.Text/DateFormatSymbolWidth.xml
index 157c588c4..199ed6f8d 100644
--- a/docs/xml/Android.Icu.Text/DateFormatSymbolWidth.xml
+++ b/docs/xml/Android.Icu.Text/DateFormatSymbolWidth.xml
@@ -42,9 +42,12 @@
0
- To be added.
+
+ [icu] Constant for width.
+ Android reference for android.icu.text.DateFormatSymbols.ABBREVIATED.
+ Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
+
- Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
@@ -73,9 +76,12 @@
2
- To be added.
+
+ [icu] Constant for width.
+ Android reference for android.icu.text.DateFormatSymbols.NARROW.
+ Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
+
- Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
@@ -104,9 +110,12 @@
3
- To be added.
+
+ [icu] Constant for width; only supported for weekdays.
+ Android reference for android.icu.text.DateFormatSymbols.SHORT.
+ Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
+
- Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
@@ -135,9 +144,12 @@
1
- To be added.
+
+ [icu] Constant for width.
+ Android reference for android.icu.text.DateFormatSymbols.WIDE.
+ Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
+
- Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
diff --git a/docs/xml/Android.Icu.Text/DateFormatSymbols.xml b/docs/xml/Android.Icu.Text/DateFormatSymbols.xml
index cb5960a03..f45131019 100644
--- a/docs/xml/Android.Icu.Text/DateFormatSymbols.xml
+++ b/docs/xml/Android.Icu.Text/DateFormatSymbols.xml
@@ -584,7 +584,7 @@
Overrides clone.
- To be added.
+ a clone of this instance.
Overrides clone.
diff --git a/docs/xml/Android.Icu.Text/DateIntervalFormat+FormattedDateInterval.xml b/docs/xml/Android.Icu.Text/DateIntervalFormat+FormattedDateInterval.xml
index b1cc132f6..5925ca70e 100644
--- a/docs/xml/Android.Icu.Text/DateIntervalFormat+FormattedDateInterval.xml
+++ b/docs/xml/Android.Icu.Text/DateIntervalFormat+FormattedDateInterval.xml
@@ -152,11 +152,11 @@
- To be added.
- To be added
- To be added.
+ the index of the char value to be returned
+ Returns the char value at the specified index.
+ the specified char value
- To be added
+ Returns the char value at the specified index. An index ranges from zero to length() - 1. The first char value of the sequence is at index zero, the next at index one, and so on, as for array indexing. If the char value specified by the index is a surrogate, the surrogate value is returned.
Java documentation for android.icu.text.DateIntervalFormat.FormattedDateInterval.charAt(int).
@@ -293,10 +293,10 @@
- To be added
- To be added.
+ Returns the length of this character sequence.
+ the number of char s in this sequence
- To be added
+ Returns the length of this character sequence. The length is the number of 16-bit char s in the sequence.
Java documentation for android.icu.text.DateIntervalFormat.FormattedDateInterval.length().
@@ -344,11 +344,11 @@
- To be added.
- To be added
- To be added.
+ The object used for iteration state. This can provide constraints to iterate over only one specific field; see ConstrainedFieldPosition.constrainField.
+ Iterates over field positions in the FormattedValue.
+ true if a new occurrence of the field was found; false otherwise.
- To be added
+ Iterates over field positions in the FormattedValue. This lets you determine the position of specific types of substrings, like a month or a decimal separator. To loop over all field positions:
Java documentation for android.icu.text.DateIntervalFormat.FormattedDateInterval.nextPosition(android.icu.text.ConstrainedFieldPosition).
@@ -444,12 +444,12 @@
- To be added.
- To be added.
- To be added
- To be added.
+ the start index, inclusive
+ the end index, exclusive
+ Returns a CharSequence that is a subsequence of this sequence.
+ the specified subsequence
- To be added
+ Returns a CharSequence that is a subsequence of this sequence. The subsequence starts with the char value at the specified index and ends with the char value at index end - 1. The length (in char s) of the returned sequence is end - start, so if start == end then an empty sequence is returned.
Java documentation for android.icu.text.DateIntervalFormat.FormattedDateInterval.subSequence(int, int).
@@ -590,10 +590,10 @@
- To be added
- To be added.
+ Exports the formatted number as an AttributedCharacterIterator.
+ An AttributedCharacterIterator containing full field information.
- To be added
+ Exports the formatted number as an AttributedCharacterIterator. Consider using nextPosition(ConstrainedFieldPosition) if you are trying to get field information.
Java documentation for android.icu.text.DateIntervalFormat.FormattedDateInterval.toCharacterIterator().
diff --git a/docs/xml/Android.Icu.Text/DateIntervalFormat.xml b/docs/xml/Android.Icu.Text/DateIntervalFormat.xml
index 46eafe4dd..1837a3aeb 100644
--- a/docs/xml/Android.Icu.Text/DateIntervalFormat.xml
+++ b/docs/xml/Android.Icu.Text/DateIntervalFormat.xml
@@ -558,10 +558,14 @@
- To be added.
- To be added.
- To be added.
- To be added.
+ DateInterval to be formatted.
+ Format a DateInterval to produce a FormattedDateInterval.
+ A FormattedDateInterval containing the format result.
+
+ Format a DateInterval to produce a FormattedDateInterval. The FormattedDateInterval exposes field information about the formatted string.
+ Android reference for android.icu.text.DateIntervalFormat.formatToValue.
+ Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
+
@@ -592,11 +596,15 @@
- To be added.
- To be added.
- To be added.
- To be added.
- To be added.
+ calendar set to the from date in date interval to be formatted into date interval string
+ calendar set to the to date in date interval to be formatted into date interval string
+ Format 2 Calendars to produce a FormattedDateInterval.
+ A FormattedDateInterval containing the format result.
+
+ Format 2 Calendars to produce a FormattedDateInterval. The FormattedDateInterval exposes field information about the formatted string.
+ Android reference for android.icu.text.DateIntervalFormat.formatToValue.
+ Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
+
@@ -626,10 +634,14 @@
- To be added.
- To be added.
- To be added.
- To be added.
+ the DisplayContext.Type whose value to return
+ [icu] Get the formatter's DisplayContext value for the specified DisplayContext.Type, such as CAPITALIZATION.
+ the current DisplayContext setting for the specified type
+
+ [icu] Get the formatter's DisplayContext value for the specified DisplayContext.Type, such as CAPITALIZATION.
+ Android reference for android.icu.text.DateIntervalFormat.getContext.
+ Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
+
diff --git a/docs/xml/Android.Icu.Text/DateIntervalInfo.xml b/docs/xml/Android.Icu.Text/DateIntervalInfo.xml
index 72f43371b..5e1263ba4 100644
--- a/docs/xml/Android.Icu.Text/DateIntervalInfo.xml
+++ b/docs/xml/Android.Icu.Text/DateIntervalInfo.xml
@@ -387,10 +387,10 @@
- To be added
+ Provides for the clone operation.
To be added.
- To be added
+ Provides for the clone operation. Any clone is initially unfrozen.
Java documentation for android.icu.text.DateIntervalInfo.cloneAsThawed().
@@ -538,10 +538,10 @@
- To be added
- To be added.
+ Freezes the object.
+ the object itself.
- To be added
+ Freezes the object.
Java documentation for android.icu.text.DateIntervalInfo.freeze().
@@ -590,11 +590,13 @@
- To be added.
- To be added.
- To be added.
- To be added.
+ the skeleton
+ the largest different calendar field
+ Get the interval pattern given the largest different calendar field.
+ interval pattern return null if interval pattern is not found.
+ Get the interval pattern given the largest different calendar field.
+ Android reference for android.icu.text.DateIntervalInfo.getIntervalPattern.
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
@@ -626,10 +628,10 @@
System.Boolean
- To be added
+ Determines whether the object has been frozen or not.
To be added.
- To be added
+ Determines whether the object has been frozen or not.
Java documentation for android.icu.text.DateIntervalInfo.isFrozen().
diff --git a/docs/xml/Android.Icu.Text/DateTimePatternGenerator.xml b/docs/xml/Android.Icu.Text/DateTimePatternGenerator.xml
index acd006868..e22228477 100644
--- a/docs/xml/Android.Icu.Text/DateTimePatternGenerator.xml
+++ b/docs/xml/Android.Icu.Text/DateTimePatternGenerator.xml
@@ -159,12 +159,14 @@
- To be added.
- To be added.
- To be added.
- To be added.
+ Pattern to add.
+ When existing values are to be overridden use true, otherwise use false.
+ Returned information.
+ Adds a pattern to the generator.
To be added.
+ Adds a pattern to the generator. If the pattern has the same skeleton as an existing pattern, and the override parameter is set, then the previous value is overridden. Otherwise, the previous value is retained. In either case, the conflicting information is returned in PatternInfo. Note that single-field patterns (like "MMM") are automatically added, and don't need to be added explicitly! Example code:
+ Android reference for android.icu.text.DateTimePatternGenerator.addPattern.
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
@@ -286,10 +288,10 @@
- To be added
+ Provides for the clone operation.
To be added.
- To be added
+ Provides for the clone operation. Any clone is initially unfrozen.
Java documentation for android.icu.text.DateTimePatternGenerator.cloneAsThawed().
@@ -609,9 +611,13 @@
Android.Icu.Text.DateFormat+HourCycle
- To be added.
+ Return the default hour cycle.
To be added.
- To be added.
+
+ Return the default hour cycle.
+ Android reference for android.icu.text.DateTimePatternGenerator.getDefaultHourCycle.
+ Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
+
@@ -750,10 +756,10 @@
- To be added
- To be added.
+ Freezes the object.
+ the object itself.
- To be added
+ Freezes the object.
Java documentation for android.icu.text.DateTimePatternGenerator.freeze().
@@ -1161,11 +1167,14 @@
- To be added.
- To be added.
- To be added.
- To be added.
- To be added.
+ The field type, such as ERA.
+ The desired DisplayWidth, such as DisplayWidth.ABBREVIATED.
+ The general interface to get a display name for a particular date/time field, in one of several possible display widths.
+ The display name for the field
+ To be added.
+ Android reference for android.icu.text.DateTimePatternGenerator.getFieldDisplayName.
+ Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
+
@@ -1474,10 +1483,10 @@
System.Boolean
- To be added
+ Determines whether the object has been frozen or not.
To be added.
- To be added
+ Determines whether the object has been frozen or not.
Java documentation for android.icu.text.DateTimePatternGenerator.isFrozen().
diff --git a/docs/xml/Android.Icu.Text/DateTimePatternMatchOptions.xml b/docs/xml/Android.Icu.Text/DateTimePatternMatchOptions.xml
index 5236c465a..115d0833a 100644
--- a/docs/xml/Android.Icu.Text/DateTimePatternMatchOptions.xml
+++ b/docs/xml/Android.Icu.Text/DateTimePatternMatchOptions.xml
@@ -42,9 +42,12 @@
65535
- To be added.
+
+ Option mask for forcing the width of all date and time fields.
+ Android reference for android.icu.text.DateTimePatternGenerator.MATCH_ALL_FIELDS_LENGTH.
+ Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
+
- Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
@@ -73,9 +76,12 @@
2048
- To be added.
+
+ Option mask for forcing the width of hour field.
+ Android reference for android.icu.text.DateTimePatternGenerator.MATCH_HOUR_FIELD_LENGTH.
+ Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
+
- Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
@@ -104,9 +110,12 @@
0
- To be added.
+
+ Default option mask used for getBestPattern(String,int) and replaceFieldTypes(String,String,int).
+ Android reference for android.icu.text.DateTimePatternGenerator.MATCH_NO_OPTIONS.
+ Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
+
- Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
diff --git a/docs/xml/Android.Icu.Text/DecimalFormat.xml b/docs/xml/Android.Icu.Text/DecimalFormat.xml
index 867846453..f46114a7e 100644
--- a/docs/xml/Android.Icu.Text/DecimalFormat.xml
+++ b/docs/xml/Android.Icu.Text/DecimalFormat.xml
@@ -665,9 +665,11 @@
Android.Icu.Util.Currency+CurrencyUsage
- To be added.
+ [icu] Returns the strategy for rounding currency amounts.
To be added.
+ [icu] Returns the strategy for rounding currency amounts.
+ Android reference for android.icu.text.DecimalFormat.getCurrencyUsage.
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
@@ -971,10 +973,10 @@
To be added.
To be added.
To be added.
- To be added
+ [icu] Formats an ICU BigDecimal.
To be added.
- To be added
+ [icu] Formats an ICU BigDecimal. Specialization of format.
Java documentation for android.icu.text.DecimalFormat.format(android.icu.math.BigDecimal, java.lang.StringBuffer, java.text.FieldPosition).
@@ -1020,10 +1022,10 @@
To be added.
To be added.
To be added.
- To be added
+ [icu] Formats a BigDecimal.
To be added.
- To be added
+ [icu] Formats a BigDecimal. Specialization of format.
Java documentation for android.icu.text.DecimalFormat.format(java.math.BigDecimal, java.lang.StringBuffer, java.text.FieldPosition).
@@ -1069,10 +1071,10 @@
To be added.
To be added.
To be added.
- To be added
+ [icu] Formats a BigInteger.
To be added.
- To be added
+ [icu] Formats a BigInteger. Specialization of format.
Java documentation for android.icu.text.DecimalFormat.format(java.math.BigInteger, java.lang.StringBuffer, java.text.FieldPosition).
@@ -1118,10 +1120,10 @@
To be added.
To be added.
To be added.
- To be added
+ Specialization of format.
To be added.
- To be added
+ Specialization of format.
Java documentation for android.icu.text.DecimalFormat.format(double, java.lang.StringBuffer, java.text.FieldPosition).
@@ -1167,10 +1169,10 @@
To be added.
To be added.
To be added.
- To be added
+ Specialization of format.
To be added.
- To be added
+ Specialization of format.
Java documentation for android.icu.text.DecimalFormat.format(long, java.lang.StringBuffer, java.text.FieldPosition).
@@ -2382,10 +2384,10 @@
To be added.
To be added.
- To be added
+ Returns a Long if possible (e.g., within the range [Long.MIN_VALUE, Long.MAX_VALUE] and with no decimals); otherwise, returns another type, such as a BigDecimal, BigInteger, or Double.
To be added.
- To be added
+ Returns a Long if possible (e.g., within the range [Long.MIN_VALUE, Long.MAX_VALUE] and with no decimals); otherwise, returns another type, such as a BigDecimal, BigInteger, or Double. The return type is not guaranteed other than for the Long case. If IntegerOnly is set, will stop at a decimal point (or equivalent; e.g., for rational numbers "1 2/3", will stop after the 1). Does not throw an exception; if no object can be parsed, index is unchanged! For more detail on parsing, see the "Parsing" header in the class documentation of DecimalFormat.
Java documentation for android.icu.text.DecimalFormat.parse(java.lang.String, java.text.ParsePosition).
diff --git a/docs/xml/Android.Icu.Text/DecimalFormatSymbols.xml b/docs/xml/Android.Icu.Text/DecimalFormatSymbols.xml
index daa27380d..de0fdfd64 100644
--- a/docs/xml/Android.Icu.Text/DecimalFormatSymbols.xml
+++ b/docs/xml/Android.Icu.Text/DecimalFormatSymbols.xml
@@ -236,10 +236,10 @@
- To be added
- To be added.
+ Creates and returns a copy of this object.
+ a clone of this instance.
- To be added
+ Creates and returns a copy of this object. The precise meaning of "copy" may depend on the class of the object. The general intent is that, for any object x, the expression: will be true, and that the expression: will be true, but these are not absolute requirements. While it is typically the case that: will be true, this is not an absolute requirement. By convention, the returned object should be obtained by calling super.clone. If a class and all of its superclasses (except Object ) obey this convention, it will be the case that x.clone().getClass() == x.getClass(). By convention, the object returned by this method should be independent of this object (which is being cloned). To achieve this independence, it may be necessary to modify one or more fields of the object returned by super.clone before returning it. Typically, this means copying any mutable objects that comprise the internal "deep structure" of the object being cloned and replacing the references to these objects with references to the copies. If a class contains only primitive fields or references to immutable objects, then it is usually the case that no fields in the object returned by super.clone need to be modified.
Java documentation for android.icu.text.DecimalFormatSymbols.clone().
diff --git a/docs/xml/Android.Icu.Text/DirectionOptions.xml b/docs/xml/Android.Icu.Text/DirectionOptions.xml
index 392a6caa5..9bf4dfa5d 100644
--- a/docs/xml/Android.Icu.Text/DirectionOptions.xml
+++ b/docs/xml/Android.Icu.Text/DirectionOptions.xml
@@ -40,7 +40,11 @@
0
- To be added.
+
+ Direction constant indicating the forward direction in a transliterator, e.g., the forward rules of a rule-based Transliterator. An "A-B" transliterator transliterates A to B when operating in the forward direction, and B to A when operating in the reverse direction.
+ Android reference for android.icu.text.Transliterator.FORWARD.
+ Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
+
@@ -68,7 +72,11 @@
1
- To be added.
+
+ Direction constant indicating the reverse direction in a transliterator, e.g., the reverse rules of a rule-based Transliterator. An "A-B" transliterator transliterates A to B when operating in the forward direction, and B to A when operating in the reverse direction.
+ Android reference for android.icu.text.Transliterator.REVERSE.
+ Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
+
diff --git a/docs/xml/Android.Icu.Text/DisplayContext.xml b/docs/xml/Android.Icu.Text/DisplayContext.xml
index bb492ee59..b3cd38839 100644
--- a/docs/xml/Android.Icu.Text/DisplayContext.xml
+++ b/docs/xml/Android.Icu.Text/DisplayContext.xml
@@ -258,9 +258,11 @@
- To be added.
+ Get the Type part of the enum item (e.g.
To be added.
+ Get the Type part of the enum item (e.g. CAPITALIZATION)
+ Android reference for android.icu.text.DisplayContext.type.
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
diff --git a/docs/xml/Android.Icu.Text/DisplayOptions+Builder.xml b/docs/xml/Android.Icu.Text/DisplayOptions+Builder.xml
index 6d623c13b..27deadbcf 100644
--- a/docs/xml/Android.Icu.Text/DisplayOptions+Builder.xml
+++ b/docs/xml/Android.Icu.Text/DisplayOptions+Builder.xml
@@ -169,10 +169,14 @@
- To be added.
- To be added.
+ The capitalization.
+ Sets the capitalization.
To be added.
- To be added.
+
+ Sets the capitalization.
+ Android reference for android.icu.text.DisplayOptions.Builder.setCapitalization.
+ Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
+
@@ -202,10 +206,14 @@
- To be added.
- To be added.
+ The display length.
+ Sets the display length.
To be added.
- To be added.
+
+ Sets the display length.
+ Android reference for android.icu.text.DisplayOptions.Builder.setDisplayLength.
+ Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
+
@@ -235,10 +243,14 @@
- To be added.
- To be added.
+ The grammatical case.
+ Sets the grammatical case.
To be added.
- To be added.
+
+ Sets the grammatical case.
+ Android reference for android.icu.text.DisplayOptions.Builder.setGrammaticalCase.
+ Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
+
@@ -268,10 +280,14 @@
- To be added.
- To be added.
+ The name style.
+ Sets the name style.
To be added.
- To be added.
+
+ Sets the name style.
+ Android reference for android.icu.text.DisplayOptions.Builder.setNameStyle.
+ Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
+
@@ -301,10 +317,14 @@
- To be added.
- To be added.
+ The noun class.
+ Sets the noun class.
To be added.
- To be added.
+
+ Sets the noun class.
+ Android reference for android.icu.text.DisplayOptions.Builder.setNounClass.
+ Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
+
@@ -334,10 +354,13 @@
- To be added.
- To be added.
+ The plural category.
+ Sets the plural category.
To be added.
- To be added.
+ To be added.
+ Android reference for android.icu.text.DisplayOptions.Builder.setPluralCategory.
+ Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
+
@@ -367,10 +390,14 @@
- To be added.
- To be added.
+ The substitute handling.
+ Sets the substitute handling.
To be added.
- To be added.
+
+ Sets the substitute handling.
+ Android reference for android.icu.text.DisplayOptions.Builder.setSubstituteHandling.
+ Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
+
diff --git a/docs/xml/Android.Icu.Text/DisplayOptions.xml b/docs/xml/Android.Icu.Text/DisplayOptions.xml
index 1b2a60262..37d06f574 100644
--- a/docs/xml/Android.Icu.Text/DisplayOptions.xml
+++ b/docs/xml/Android.Icu.Text/DisplayOptions.xml
@@ -81,9 +81,13 @@
- To be added.
+ Creates a builder with the same parameters from this object.
To be added.
- To be added.
+
+ Creates a builder with the same parameters from this object.
+ Android reference for android.icu.text.DisplayOptions.copyToBuilder.
+ Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
+
@@ -111,9 +115,13 @@
- To be added.
+ Gets the capitalization.
To be added.
- To be added.
+
+ Gets the capitalization.
+ Android reference for android.icu.text.DisplayOptions.getCapitalization.
+ Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
+
@@ -141,9 +149,13 @@
- To be added.
+ Gets the display length.
To be added.
- To be added.
+
+ Gets the display length.
+ Android reference for android.icu.text.DisplayOptions.getDisplayLength.
+ Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
+
@@ -171,9 +183,13 @@
- To be added.
+ Gets the grammatical case.
To be added.
- To be added.
+
+ Gets the grammatical case.
+ Android reference for android.icu.text.DisplayOptions.getGrammaticalCase.
+ Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
+
@@ -201,9 +217,13 @@
- To be added.
+ Gets the name style.
To be added.
- To be added.
+
+ Gets the name style.
+ Android reference for android.icu.text.DisplayOptions.getNameStyle.
+ Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
+
@@ -231,9 +251,13 @@
- To be added.
+ Gets the noun class.
To be added.
- To be added.
+
+ Gets the noun class.
+ Android reference for android.icu.text.DisplayOptions.getNounClass.
+ Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
+
@@ -261,9 +285,13 @@
- To be added.
+ Gets the plural category.
To be added.
- To be added.
+
+ Gets the plural category.
+ Android reference for android.icu.text.DisplayOptions.getPluralCategory.
+ Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
+
@@ -291,9 +319,13 @@
- To be added.
+ Gets the substitute handling.
To be added.
- To be added.
+
+ Gets the substitute handling.
+ Android reference for android.icu.text.DisplayOptions.getSubstituteHandling.
+ Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
+
@@ -321,9 +353,13 @@
- To be added.
+ Creates a builder with the UNDEFINED value for all the parameters.
To be added.
- To be added.
+
+ Creates a builder with the UNDEFINED value for all the parameters.
+ Android reference for android.icu.text.DisplayOptions.builder.
+ Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
+
diff --git a/docs/xml/Android.Icu.Text/Edits.xml b/docs/xml/Android.Icu.Text/Edits.xml
index ac91a350a..ce58a9747 100644
--- a/docs/xml/Android.Icu.Text/Edits.xml
+++ b/docs/xml/Android.Icu.Text/Edits.xml
@@ -239,9 +239,13 @@
Android.Icu.Text.Edits+Iterator
- To be added.
- To be added.
- To be added.
+ Returns an Iterator for coarse-grained change edits (adjacent change edits are treated as one).
+ an Iterator that merges adjacent changes.
+
+ Returns an Iterator for coarse-grained change edits (adjacent change edits are treated as one). Can be used to perform simple string updates. Skips no-change edits.
+ Android reference for android.icu.text.Edits.getCoarseChangesIterator.
+ Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
+
@@ -268,9 +272,13 @@
Android.Icu.Text.Edits+Iterator
- To be added.
- To be added.
- To be added.
+ Returns an Iterator for coarse-grained change and no-change edits (adjacent change edits are treated as one).
+ an Iterator that merges adjacent changes.
+
+ Returns an Iterator for coarse-grained change and no-change edits (adjacent change edits are treated as one). Can be used to perform simple string updates. Adjacent change edits are treated as one edit.
+ Android reference for android.icu.text.Edits.getCoarseIterator.
+ Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
+
@@ -297,9 +305,12 @@
Android.Icu.Text.Edits+Iterator
- To be added.
- To be added.
- To be added.
+ Returns an Iterator for fine-grained change edits (full granularity of change edits is retained).
+ an Iterator that separates adjacent changes.
+ To be added.
+ Android reference for android.icu.text.Edits.getFineChangesIterator.
+ Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
+
@@ -326,9 +337,13 @@
Android.Icu.Text.Edits+Iterator
- To be added.
- To be added.
- To be added.
+ Returns an Iterator for fine-grained change and no-change edits (full granularity of change edits is retained).
+ an Iterator that separates adjacent changes.
+
+ Returns an Iterator for fine-grained change and no-change edits (full granularity of change edits is retained). Can be used for modifying styled text.
+ Android reference for android.icu.text.Edits.getFineIterator.
+ Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
+
diff --git a/docs/xml/Android.Icu.Text/IDNA.xml b/docs/xml/Android.Icu.Text/IDNA.xml
index 11a5c015c..46fdc322e 100644
--- a/docs/xml/Android.Icu.Text/IDNA.xml
+++ b/docs/xml/Android.Icu.Text/IDNA.xml
@@ -424,12 +424,14 @@
- To be added.
- To be added.
- To be added.
- To be added.
- To be added.
+ Input domain name label
+ Destination string object
+ Output container of IDNA processing details.
+ Converts a single domain name label into its ASCII form for DNS lookup.
+ dest
+ Converts a single domain name label into its ASCII form for DNS lookup. If any processing step fails, then info.hasErrors() will be true and the result might not be an ASCII string. The label might be modified according to the types of errors. Labels with severe errors will be left in (or turned into) their Unicode form.
+ Android reference for android.icu.text.IDNA.labelToASCII.
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
@@ -498,12 +500,14 @@
- To be added.
- To be added.
- To be added.
- To be added.
- To be added.
+ Input domain name label
+ Destination string object
+ Output container of IDNA processing details.
+ Converts a single domain name label into its Unicode form for human-readable display.
+ dest
+ Converts a single domain name label into its Unicode form for human-readable display. If any processing step fails, then info.hasErrors() will be true. The label might be modified according to the types of errors.
+ Android reference for android.icu.text.IDNA.labelToUnicode.
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
@@ -572,12 +576,14 @@
- To be added.
- To be added.
- To be added.
- To be added.
- To be added.
+ Input domain name
+ Destination string object
+ Output container of IDNA processing details.
+ Converts a whole domain name into its ASCII form for DNS lookup.
+ dest
+ Converts a whole domain name into its ASCII form for DNS lookup. If any processing step fails, then info.hasErrors() will be true and the result might not be an ASCII string. The domain name might be modified according to the types of errors. Labels with severe errors will be left in (or turned into) their Unicode form.
+ Android reference for android.icu.text.IDNA.nameToASCII.
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
@@ -646,12 +652,14 @@
- To be added.
- To be added.
- To be added.
- To be added.
- To be added.
+ Input domain name
+ Destination string object
+ Output container of IDNA processing details.
+ Converts a whole domain name into its Unicode form for human-readable display.
+ dest
+ Converts a whole domain name into its Unicode form for human-readable display. If any processing step fails, then info.hasErrors() will be true. The domain name might be modified according to the types of errors.
+ Android reference for android.icu.text.IDNA.nameToUnicode.
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
diff --git a/docs/xml/Android.Icu.Text/IDNAOptions.xml b/docs/xml/Android.Icu.Text/IDNAOptions.xml
index e2c5c69dd..83040e7b3 100644
--- a/docs/xml/Android.Icu.Text/IDNAOptions.xml
+++ b/docs/xml/Android.Icu.Text/IDNAOptions.xml
@@ -42,9 +42,12 @@
4
- To be added.
+
+ IDNA option to check for whether the input conforms to the BiDi rules. For use in static worker and factory methods. This option is ignored by the IDNA2003 implementation. (IDNA2003 always performs a BiDi check.)
+ Android reference for android.icu.text.IDNA.CHECK_BIDI.
+ Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
+
- Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
@@ -73,9 +76,12 @@
8
- To be added.
+
+ IDNA option to check for whether the input conforms to the CONTEXTJ rules. For use in static worker and factory methods. This option is ignored by the IDNA2003 implementation. (The CONTEXTJ check is new in IDNA2008.)
+ Android reference for android.icu.text.IDNA.CHECK_CONTEXTJ.
+ Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
+
- Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
@@ -104,9 +110,12 @@
64
- To be added.
+
+ IDNA option to check for whether the input conforms to the CONTEXTO rules. For use in static worker and factory methods. This option is ignored by the IDNA2003 implementation. (The CONTEXTO check is new in IDNA2008.) This is for use by registries for IDNA2008 conformance. UTS #46 does not require the CONTEXTO check.
+ Android reference for android.icu.text.IDNA.CHECK_CONTEXTO.
+ Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
+
- Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
@@ -135,9 +144,12 @@
0
- To be added.
+
+ Default options value: None of the other options are set.
+ Android reference for android.icu.text.IDNA.DEFAULT.
+ Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
+
- Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
@@ -166,9 +178,12 @@
16
- To be added.
+
+ IDNA option for nontransitional processing in ToASCII(). For use in static worker and factory methods. By default, ToASCII() uses transitional processing. Unicode 15.1 UTS #46 deprecated transitional processing. This option is ignored by the IDNA2003 implementation. (This is only relevant for compatibility of newer IDNA implementations with IDNA2003.)
+ Android reference for android.icu.text.IDNA.NONTRANSITIONAL_TO_ASCII.
+ Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
+
- Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
@@ -197,9 +212,12 @@
32
- To be added.
+
+ IDNA option for nontransitional processing in ToUnicode(). For use in static worker and factory methods. By default, ToUnicode() uses transitional processing. Unicode 15.1 UTS #46 deprecated transitional processing. This option is ignored by the IDNA2003 implementation. (This is only relevant for compatibility of newer IDNA implementations with IDNA2003.)
+ Android reference for android.icu.text.IDNA.NONTRANSITIONAL_TO_UNICODE.
+ Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
+
- Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
@@ -228,9 +246,12 @@
2
- To be added.
+
+ Option to check whether the input conforms to the STD3 ASCII rules, for example the restriction of labels to LDH characters (ASCII Letters, Digits and Hyphen-Minus). For use in static worker and factory methods.
+ Android reference for android.icu.text.IDNA.USE_STD3_RULES.
+ Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
+
- Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
diff --git a/docs/xml/Android.Icu.Text/IReplaceable.xml b/docs/xml/Android.Icu.Text/IReplaceable.xml
index 732cd254f..234539c60 100644
--- a/docs/xml/Android.Icu.Text/IReplaceable.xml
+++ b/docs/xml/Android.Icu.Text/IReplaceable.xml
@@ -328,9 +328,11 @@
System.Boolean
- To be added.
- To be added.
+ R Returns true if this object contains metadata.
+ true if this object contains metadata
+ R Returns true if this object contains metadata. If a Replaceable object has metadata, calls to the Replaceable API must be made so as to preserve metadata. If it does not, calls to the Replaceable API may be optimized to improve performance.
+ Android reference for android.icu.text.Replaceable.hasMetaData.
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
diff --git a/docs/xml/Android.Icu.Text/ListFormatter+FormattedList.xml b/docs/xml/Android.Icu.Text/ListFormatter+FormattedList.xml
index 5cf1d9b3f..0cebad18f 100644
--- a/docs/xml/Android.Icu.Text/ListFormatter+FormattedList.xml
+++ b/docs/xml/Android.Icu.Text/ListFormatter+FormattedList.xml
@@ -152,11 +152,11 @@
- To be added.
- To be added
- To be added.
+ the index of the char value to be returned
+ Returns the char value at the specified index.
+ the specified char value
- To be added
+ Returns the char value at the specified index. An index ranges from zero to length() - 1. The first char value of the sequence is at index zero, the next at index one, and so on, as for array indexing. If the char value specified by the index is a surrogate, the surrogate value is returned.
Java documentation for android.icu.text.ListFormatter.FormattedList.charAt(int).
@@ -293,10 +293,10 @@
- To be added
- To be added.
+ Returns the length of this character sequence.
+ the number of char s in this sequence
- To be added
+ Returns the length of this character sequence. The length is the number of 16-bit char s in the sequence.
Java documentation for android.icu.text.ListFormatter.FormattedList.length().
@@ -344,11 +344,11 @@
- To be added.
- To be added
- To be added.
+ The object used for iteration state. This can provide constraints to iterate over only one specific field; see ConstrainedFieldPosition.constrainField.
+ Iterates over field positions in the FormattedValue.
+ true if a new occurrence of the field was found; false otherwise.
- To be added
+ Iterates over field positions in the FormattedValue. This lets you determine the position of specific types of substrings, like a month or a decimal separator. To loop over all field positions:
Java documentation for android.icu.text.ListFormatter.FormattedList.nextPosition(android.icu.text.ConstrainedFieldPosition).
@@ -444,12 +444,12 @@
- To be added.
- To be added.
- To be added
- To be added.
+ the start index, inclusive
+ the end index, exclusive
+ Returns a CharSequence that is a subsequence of this sequence.
+ the specified subsequence
- To be added
+ Returns a CharSequence that is a subsequence of this sequence. The subsequence starts with the char value at the specified index and ends with the char value at index end - 1. The length (in char s) of the returned sequence is end - start, so if start == end then an empty sequence is returned.
Java documentation for android.icu.text.ListFormatter.FormattedList.subSequence(int, int).
@@ -590,10 +590,10 @@
- To be added
- To be added.
+ Exports the formatted number as an AttributedCharacterIterator.
+ An AttributedCharacterIterator containing full field information.
- To be added
+ Exports the formatted number as an AttributedCharacterIterator. Consider using nextPosition(ConstrainedFieldPosition) if you are trying to get field information.
Java documentation for android.icu.text.ListFormatter.FormattedList.toCharacterIterator().
diff --git a/docs/xml/Android.Icu.Text/ListFormatter.xml b/docs/xml/Android.Icu.Text/ListFormatter.xml
index 56f20ec32..3e8c40910 100644
--- a/docs/xml/Android.Icu.Text/ListFormatter.xml
+++ b/docs/xml/Android.Icu.Text/ListFormatter.xml
@@ -86,10 +86,12 @@
- To be added.
- To be added.
- To be added.
+ items to format. The toString() method is called on each.
+ Format a list of objects.
+ items formatted into a string
+ Format a list of objects.
+ Android reference for android.icu.text.ListFormatter.format.
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
@@ -184,10 +186,14 @@
- To be added.
- To be added.
- To be added.
- To be added.
+ items to format. The toString() method is called on each.
+ Format a list of objects to a FormattedList.
+ items formatted into a FormattedList
+
+ Format a list of objects to a FormattedList. You can access the offsets of each element from the FormattedList.
+ Android reference for android.icu.text.ListFormatter.formatToValue.
+ Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
+
@@ -224,10 +230,13 @@
- To be added.
- To be added.
- To be added.
- To be added.
+ items to format. The toString() method is called on each.
+ Format a collection of objects to a FormattedList.
+ items formatted into a FormattedList
+ To be added.
+ Android reference for android.icu.text.ListFormatter.formatToValue.
+ Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
+
@@ -349,12 +358,16 @@
- To be added.
+ the locale in question.
To be added.
To be added.
- To be added.
+ Create a list formatter that is appropriate for a locale.
To be added.
- To be added.
+
+ Create a list formatter that is appropriate for a locale.
+ Android reference for android.icu.text.ListFormatter.getInstance.
+ Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
+
@@ -386,12 +399,16 @@
- To be added.
+ the locale in question.
To be added.
To be added.
- To be added.
+ Create a list formatter that is appropriate for a locale.
To be added.
- To be added.
+
+ Create a list formatter that is appropriate for a locale.
+ Android reference for android.icu.text.ListFormatter.getInstance.
+ Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
+
diff --git a/docs/xml/Android.Icu.Text/LocaleDisplayNames.xml b/docs/xml/Android.Icu.Text/LocaleDisplayNames.xml
index 4ea942316..749540700 100644
--- a/docs/xml/Android.Icu.Text/LocaleDisplayNames.xml
+++ b/docs/xml/Android.Icu.Text/LocaleDisplayNames.xml
@@ -98,10 +98,12 @@
- To be added.
- To be added.
- To be added.
+ the DisplayContext.Type whose value to return
+ Returns the current value for a specified DisplayContext.Type.
+ the current DisplayContext setting for the specified type
+ Returns the current value for a specified DisplayContext.Type.
+ Android reference for android.icu.text.LocaleDisplayNames.getContext.
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
@@ -131,9 +133,11 @@
- To be added.
- To be added.
+ Returns the dialect handling used in the display names.
+ the dialect handling enum
+ Returns the dialect handling used in the display names.
+ Android reference for android.icu.text.LocaleDisplayNames.getDialectHandling.
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
@@ -271,11 +275,13 @@
- To be added.
- To be added.
- To be added.
- To be added.
+ the display locale
+ one or more context settings (e.g. for dialect handling, capitalization, etc.
+ Returns an instance of LocaleDisplayNames that returns names formatted for the provided locale, using the provided DisplayContext settings
+ a LocaleDisplayNames instance
+ Returns an instance of LocaleDisplayNames that returns names formatted for the provided locale, using the provided DisplayContext settings
+ Android reference for android.icu.text.LocaleDisplayNames.getInstance.
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
@@ -308,11 +314,13 @@
- To be added.
- To be added.
- To be added.
- To be added.
+ the display locale
+ how to select names for locales
+ Returns an instance of LocaleDisplayNames that returns names formatted for the provided locale, using the provided dialectHandling.
+ a LocaleDisplayNames instance
+ Returns an instance of LocaleDisplayNames that returns names formatted for the provided locale, using the provided dialectHandling.
+ Android reference for android.icu.text.LocaleDisplayNames.getInstance.
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
@@ -356,11 +364,13 @@
- To be added.
- To be added.
- To be added.
- To be added.
+ the display Locale
+ one or more context settings (e.g. for dialect handling, capitalization, etc.
+ Returns an instance of LocaleDisplayNames that returns names formatted for the provided Locale, using the provided DisplayContext settings
+ a LocaleDisplayNames instance
+ Returns an instance of LocaleDisplayNames that returns names formatted for the provided Locale, using the provided DisplayContext settings
+ Android reference for android.icu.text.LocaleDisplayNames.getInstance.
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
@@ -690,9 +700,11 @@
Android.Icu.Util.ULocale
- To be added.
- To be added.
+ Returns the locale used to determine the display names.
+ the display locale
+ Returns the locale used to determine the display names. This is not necessarily the same locale passed to getInstance(ULocale).
+ Android reference for android.icu.text.LocaleDisplayNames.getLocale.
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
diff --git a/docs/xml/Android.Icu.Text/MeasureFormat.xml b/docs/xml/Android.Icu.Text/MeasureFormat.xml
index 04995881a..d14154a3a 100644
--- a/docs/xml/Android.Icu.Text/MeasureFormat.xml
+++ b/docs/xml/Android.Icu.Text/MeasureFormat.xml
@@ -181,10 +181,10 @@
- To be added.
+ the reference object with which to compare.
Two MeasureFormats, a and b, are equal if and only if they have the same formatWidth, locale, and
equal number formats.
- To be added.
+ true if this object is the same as the obj argument; false otherwise.
Two MeasureFormats, a and b, are equal if and only if they have the same formatWidth, locale, and
equal number formats.
@@ -235,7 +235,7 @@
Identifies a field in the formatted text.
Able to format Collection<? extends Measure>, Measure[], and Measure by delegating to
formatMeasures.
- To be added.
+ the string buffer passed in as toAppendTo, with formatted text appended
Able to format Collection<? extends Measure>, Measure[], and Measure by delegating to
formatMeasures. If the pos argument identifies a NumberFormat field, then its indices are set to
@@ -347,10 +347,12 @@
- To be added.
- To be added.
- To be added.
+ a sequence of one or more measures.
+ Format a sequence of measures.
+ the formatted string.
+ Format a sequence of measures. Uses the ListFormatter unit lists. So, for example, one could format “3 feet, 2 inches”. Zero values are formatted (eg, “3 feet, 0 inches”). It is the caller’s responsibility to have the appropriate values in appropriate order, and using the appropriate Number values. Typically the units should be in descending order, with all but the last Measure having integer values (eg, not “3.2 feet, 2 inches”).
+ Android reference for android.icu.text.MeasureFormat.formatMeasures.
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
@@ -395,12 +397,14 @@
- To be added.
- To be added.
- To be added.
- To be added.
- To be added.
+ the formatted string appended here.
+ Identifies a field in the formatted text.
+ the measures to format.
+ Formats a sequence of measures.
+ appendTo.
+ Formats a sequence of measures. If the fieldPosition argument identifies a NumberFormat field, then its indices are set to the beginning and end of the first such field encountered. MeasureFormat itself does not supply any fields.
+ Android reference for android.icu.text.MeasureFormat.formatMeasures.
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
@@ -520,10 +524,10 @@
- To be added
- To be added.
+ Returns a hash code value for the object.
+ a hash code value for this object.
- To be added
+ Returns a hash code value for the object. This method is supported for the benefit of hash tables such as those provided by HashMap. The general contract of hashCode is: Whenever it is invoked on the same object more than once during an execution of a Java application, the hashCode method must consistently return the same integer, provided no information used in equals comparisons on the object is modified. This integer need not remain consistent from one execution of an application to another execution of the same application. If two objects are equal according to the equals method, then calling the hashCode method on each of the two objects must produce the same integer result. It is not required that if two objects are unequal according to the equals method, then calling the hashCode method on each of the two objects must produce distinct integer results. However, the programmer should be aware that producing distinct integer results for unequal objects may improve the performance of hash tables.
Java documentation for android.icu.text.MeasureFormat.hashCode().
@@ -565,11 +569,13 @@
- To be added.
- To be added.
- To be added.
- To be added.
+ the locale.
+ hints how long formatted strings should be.
+ Create a format from the locale, formatWidth, and format.
+ The new MeasureFormat object.
+ Create a format from the locale, formatWidth, and format.
+ Android reference for android.icu.text.MeasureFormat.getInstance.
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
@@ -602,11 +608,13 @@
- To be added.
- To be added.
- To be added.
- To be added.
+ the Locale.
+ hints how long formatted strings should be.
+ Create a format from the Locale and formatWidth.
+ The new MeasureFormat object.
+ Create a format from the Locale and formatWidth.
+ Android reference for android.icu.text.MeasureFormat.getInstance.
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
@@ -640,12 +648,14 @@
- To be added.
- To be added.
- To be added.
- To be added.
- To be added.
+ the locale.
+ hints how long formatted strings should be.
+ This is defensively copied.
+ Create a format from the locale, formatWidth, and format.
+ The new MeasureFormat object.
+ Create a format from the locale, formatWidth, and format.
+ Android reference for android.icu.text.MeasureFormat.getInstance.
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
@@ -679,12 +689,14 @@
- To be added.
- To be added.
- To be added.
- To be added.
- To be added.
+ the Locale.
+ hints how long formatted strings should be.
+ This is defensively copied.
+ Create a format from the Locale, formatWidth, and format.
+ The new MeasureFormat object.
+ Create a format from the Locale, formatWidth, and format.
+ Android reference for android.icu.text.MeasureFormat.getInstance.
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
@@ -886,10 +898,10 @@
- To be added.
- To be added.
+ A String, part of which should be parsed.
+ A ParsePosition object with index and error index information as described above.
Parses text from a string to produce a Measure.
- To be added.
+ An Object parsed from the string. In case of error, returns null.
Parses text from a string to produce a Measure.
@@ -999,9 +1011,11 @@
Android.Icu.Text.MeasureFormat+FormatWidth
- To be added.
+ Get the format width this instance is using.
To be added.
+ Get the format width this instance is using.
+ Android reference for android.icu.text.MeasureFormat.getWidth.
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
diff --git a/docs/xml/Android.Icu.Text/MessageFormat.xml b/docs/xml/Android.Icu.Text/MessageFormat.xml
index 8fffa5d65..420d62a23 100644
--- a/docs/xml/Android.Icu.Text/MessageFormat.xml
+++ b/docs/xml/Android.Icu.Text/MessageFormat.xml
@@ -433,9 +433,11 @@
Android.Icu.Text.MessagePattern+ApostropheMode
- To be added.
- To be added.
+ [icu]
+ this instance's ApostropheMode.
+ [icu]
+ Android reference for android.icu.text.MessageFormat.getApostropheMode.
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
@@ -515,10 +517,12 @@
- To be added.
- To be added.
- To be added.
+ the pattern for this message format
+ the new ApostropheMode
+ [icu] Sets the ApostropheMode and the pattern used by this message format.
+ [icu] Sets the ApostropheMode and the pattern used by this message format. Parses the pattern and caches Format objects for simple argument types. Patterns and their interpretation are specified in the class description. This method is best used only once on a given object to avoid confusion about the mode, and after constructing the object with an empty pattern string to minimize overhead.
+ Android reference for android.icu.text.MessageFormat.applyPattern.
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
@@ -674,9 +678,11 @@
To be added.
To be added.
- To be added.
+ Creates a MessageFormat with the given pattern and uses it to format the given arguments.
To be added.
+ Creates a MessageFormat with the given pattern and uses it to format the given arguments. This is equivalent to (new MessageFormat (pattern)). format (arguments, new StringBuffer(), null).toString()
+ Android reference for android.icu.text.MessageFormat.format.
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
@@ -775,7 +781,7 @@
Formats a map or array of objects and appends the MessageFormat's
pattern, with format elements replaced by the formatted objects, to the
provided StringBuffer.
- To be added.
+ the string buffer passed in as toAppendTo, with formatted text appended
Formats a map or array of objects and appends the MessageFormat's
pattern, with format elements replaced by the formatted objects, to the
diff --git a/docs/xml/Android.Icu.Text/MessagePattern+Part+Type.xml b/docs/xml/Android.Icu.Text/MessagePattern+Part+Type.xml
index 738713727..a03e722c9 100644
--- a/docs/xml/Android.Icu.Text/MessagePattern+Part+Type.xml
+++ b/docs/xml/Android.Icu.Text/MessagePattern+Part+Type.xml
@@ -30,13 +30,9 @@
- To be added.
+ Part type constants.
-
-
- Android platform documentation
-
-
+ Android reference for android.icu.text.MessagePattern.Part.Type.
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
@@ -344,9 +340,11 @@
System.Boolean
- To be added.
- To be added.
+ Indicates whether this part has a numeric value.
+ true if this part has a numeric value.
+ Indicates whether this part has a numeric value. If so, then that numeric value can be retrieved via MessagePattern.getNumericValue(Part).
+ Android reference for android.icu.text.MessagePattern.Part.Type.hasNumericValue.
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
diff --git a/docs/xml/Android.Icu.Text/MessagePattern+Part.xml b/docs/xml/Android.Icu.Text/MessagePattern+Part.xml
index c957f29c7..c924a142b 100644
--- a/docs/xml/Android.Icu.Text/MessagePattern+Part.xml
+++ b/docs/xml/Android.Icu.Text/MessagePattern+Part.xml
@@ -81,9 +81,11 @@
Android.Icu.Text.MessagePattern+ArgType
- To be added.
- To be added.
+ Returns the argument type if this part is of type ARG_START or ARG_LIMIT, otherwise ArgType.NONE.
+ the argument type for this part.
+ Returns the argument type if this part is of type ARG_START or ARG_LIMIT, otherwise ArgType.NONE.
+ Android reference for android.icu.text.MessagePattern.Part.getArgType.
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
@@ -117,9 +119,11 @@
- To be added.
- To be added.
+ Returns the type of this part.
+ the part type.
+ Returns the type of this part.
+ Android reference for android.icu.text.MessagePattern.Part.getType.
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
diff --git a/docs/xml/Android.Icu.Text/MessagePattern.xml b/docs/xml/Android.Icu.Text/MessagePattern.xml
index 78a8ed32d..4e1db43ae 100644
--- a/docs/xml/Android.Icu.Text/MessagePattern.xml
+++ b/docs/xml/Android.Icu.Text/MessagePattern.xml
@@ -167,9 +167,11 @@
- To be added.
- To be added.
+ Explicit ApostropheMode.
+ Constructs an empty MessagePattern.
+ Constructs an empty MessagePattern.
+ Android reference for android.icu.text.MessagePattern.MessagePattern.
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
@@ -470,9 +472,11 @@
- To be added.
- To be added.
+ The new ApostropheMode.
+ Clears this MessagePattern and sets the ApostropheMode.
+ Clears this MessagePattern and sets the ApostropheMode. countParts() will return 0.
+ Android reference for android.icu.text.MessagePattern.clearPatternAndSetApostropheMode.
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
@@ -752,10 +756,12 @@
- To be added.
- To be added.
- To be added.
+ a part of this MessagePattern.
+ Returns the numeric value associated with an ARG_INT or ARG_DOUBLE.
+ the part's numeric value, or NO_NUMERIC_VALUE if this is not a numeric part.
+ Returns the numeric value associated with an ARG_INT or ARG_DOUBLE.
+ Android reference for android.icu.text.MessagePattern.getNumericValue.
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
@@ -787,10 +793,12 @@
- To be added.
- To be added.
- To be added.
+ The index of the Part data. (0..countParts()-1)
+ Gets the i-th pattern "part".
+ the i-th pattern "part".
+ Gets the i-th pattern "part".
+ Android reference for android.icu.text.MessagePattern.getPart.
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
@@ -822,10 +830,12 @@
- To be added.
- To be added.
- To be added.
+ The index of the Part data. (0..countParts()-1)
+ Returns the Part.Type of the i-th pattern "part".
+ The Part.Type of the i-th Part.
+ Returns the Part.Type of the i-th pattern "part". Convenience method for getPart(i).getType().
+ Android reference for android.icu.text.MessagePattern.getPartType.
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
@@ -948,10 +958,12 @@
- To be added.
- To be added.
- To be added.
+ a part of this MessagePattern.
+ Returns the substring of the pattern string indicated by the Part.
+ the substring associated with part.
+ Returns the substring of the pattern string indicated by the Part. Convenience method for getPatternString().substring(part.getIndex(), part.getLimit()).
+ Android reference for android.icu.text.MessagePattern.getSubstring.
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
@@ -1397,11 +1409,13 @@
- To be added.
- To be added.
- To be added.
- To be added.
+ a part of this MessagePattern.
+ a string.
+ Compares the part's substring with the input string s.
+ true if getSubstring(part).equals(s).
+ Compares the part's substring with the input string s.
+ Android reference for android.icu.text.MessagePattern.partSubstringMatches.
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
diff --git a/docs/xml/Android.Icu.Text/Normalizer.xml b/docs/xml/Android.Icu.Text/Normalizer.xml
index ba1a5a263..581dbd846 100644
--- a/docs/xml/Android.Icu.Text/Normalizer.xml
+++ b/docs/xml/Android.Icu.Text/Normalizer.xml
@@ -174,7 +174,7 @@
Clones this Normalizer object.
- To be added.
+ a clone of this instance.
Clones this Normalizer object. All properties of this
object are duplicated in the new object, including the cloning of any
diff --git a/docs/xml/Android.Icu.Text/Normalizer2.xml b/docs/xml/Android.Icu.Text/Normalizer2.xml
index e0767f729..0cf16f9a3 100644
--- a/docs/xml/Android.Icu.Text/Normalizer2.xml
+++ b/docs/xml/Android.Icu.Text/Normalizer2.xml
@@ -381,12 +381,15 @@
- To be added.
- To be added.
- To be added.
+ the binary, big-endian normalization (.nrm file) data, or null for ICU data
+ "nfc" or "nfkc" or "nfkc_cf" or "nfkc_scf" or name of custom data file
+ normalization mode (compose or decompose etc.)
To be added.
- To be added.
+ the requested Normalizer2, if successful
+ This method was deprecated in API level 31. Don't use because the binary data format is not stable across API levels.
+ Returns a Normalizer2 instance which uses the specified data file (an ICU data file if data=null, or else custom binary data) and which composes or decomposes text according to the specified mode. Returns an unmodifiable singleton instance. Use data=null for data files that are part of ICU's own data. Use name="nfc" and COMPOSE/DECOMPOSE for Unicode standard NFC/NFD. Use name="nfkc" and COMPOSE/DECOMPOSE for Unicode standard NFKC/NFKD. Use name="nfkc_cf" and COMPOSE for Unicode standard NFKC_CF=NFKC_Casefold. If data!=null, then the binary data is read once and cached using the provided name as the key. If you know or expect the data to be cached already, you can use data!=null for non-ICU data as well. Any IOException is wrapped into a ICUUncheckedIOException.
+ Android reference for android.icu.text.Normalizer2.getInstance.
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
@@ -1409,10 +1412,12 @@
- To be added.
- To be added.
- To be added.
+ input string
+ Tests if the string is normalized.
+ the quick check result
+ Tests if the string is normalized. For the two COMPOSE modes, the result could be "maybe" in cases that would take a little more work to resolve definitively. Use spanQuickCheckYes() and normalizeSecondAndAppend() for a faster combination of quick check + normalization, to avoid re-checking the "yes" prefix.
+ Android reference for android.icu.text.Normalizer2.quickCheck.
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
diff --git a/docs/xml/Android.Icu.Text/NormalizerCompareOptions.xml b/docs/xml/Android.Icu.Text/NormalizerCompareOptions.xml
index bacc9ab58..386d18aa3 100644
--- a/docs/xml/Android.Icu.Text/NormalizerCompareOptions.xml
+++ b/docs/xml/Android.Icu.Text/NormalizerCompareOptions.xml
@@ -42,9 +42,12 @@
32768
- To be added.
+
+ Option bit for compare: Compare strings in code point order instead of code unit order.
+ Android reference for android.icu.text.Normalizer.COMPARE_CODE_POINT_ORDER.
+ Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
+
- Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
@@ -73,9 +76,12 @@
65536
- To be added.
+
+ Option bit for compare: Perform case-insensitive comparison.
+ Android reference for android.icu.text.Normalizer.COMPARE_IGNORE_CASE.
+ Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
+
- Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
@@ -104,9 +110,12 @@
0
- To be added.
+
+ Option bit for compare: Case sensitively compare the strings
+ Android reference for android.icu.text.Normalizer.FOLD_CASE_DEFAULT.
+ Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
+
- Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
@@ -135,9 +144,12 @@
1
- To be added.
+
+ Option value for case folding: Use the modified set of mappings provided in CaseFolding.txt to handle dotted I and dotless i appropriately for Turkic languages (tr, az).
+ Android reference for android.icu.text.Normalizer.FOLD_CASE_EXCLUDE_SPECIAL_I.
+ Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
+
- Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
@@ -166,9 +178,12 @@
131072
- To be added.
+
+ Option bit for compare: Both input strings are assumed to fulfill FCD conditions.
+ Android reference for android.icu.text.Normalizer.INPUT_IS_FCD.
+ Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
+
- Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
diff --git a/docs/xml/Android.Icu.Text/NumberFormat.xml b/docs/xml/Android.Icu.Text/NumberFormat.xml
index b2d71caf9..c547cbf58 100644
--- a/docs/xml/Android.Icu.Text/NumberFormat.xml
+++ b/docs/xml/Android.Icu.Text/NumberFormat.xml
@@ -877,11 +877,11 @@
- To be added.
- To be added.
- To be added.
+ The object to format
+ where the text is to be appended
+ A FieldPosition identifying a field in the formatted text
Formats a number and appends the resulting text to the given string buffer.
- To be added.
+ the string buffer passed in as toAppendTo, with formatted text appended
Formats a number and appends the resulting text to the given string buffer.
<strong>[icu] Note:</strong> recognizes BigInteger
@@ -1216,10 +1216,12 @@
- To be added.
- To be added.
- To be added.
+ the DisplayContext.Type whose value to return
+ [icu] Get the formatter's DisplayContext value for the specified DisplayContext.Type, such as CAPITALIZATION.
+ the current DisplayContext setting for the specified type
+ [icu] Get the formatter's DisplayContext value for the specified DisplayContext.Type, such as CAPITALIZATION.
+ Android reference for android.icu.text.NumberFormat.getContext.
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
diff --git a/docs/xml/Android.Icu.Text/NumberFormatField.xml b/docs/xml/Android.Icu.Text/NumberFormatField.xml
index fd631fd25..07df11d53 100644
--- a/docs/xml/Android.Icu.Text/NumberFormatField.xml
+++ b/docs/xml/Android.Icu.Text/NumberFormatField.xml
@@ -42,9 +42,12 @@
1
- To be added.
+
+ Field constant used to construct a FieldPosition object. Signifies that the position of the fraction part of a formatted number should be returned.
+ Android reference for android.icu.text.NumberFormat.FRACTION_FIELD.
+ Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
+
- Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
@@ -73,9 +76,12 @@
0
- To be added.
+
+ Field constant used to construct a FieldPosition object. Signifies that the position of the integer part of a formatted number should be returned.
+ Android reference for android.icu.text.NumberFormat.INTEGER_FIELD.
+ Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
+
- Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
diff --git a/docs/xml/Android.Icu.Text/NumberFormatStyles.xml b/docs/xml/Android.Icu.Text/NumberFormatStyles.xml
index cbdd94bd4..7f477ff9d 100644
--- a/docs/xml/Android.Icu.Text/NumberFormatStyles.xml
+++ b/docs/xml/Android.Icu.Text/NumberFormatStyles.xml
@@ -42,9 +42,12 @@
7
- To be added.
+
+ [icu] Constant to specify currency style of format which uses currency symbol to represent currency for accounting, for example: "($3.00), instead of "-$3.00" ( CURRENCYSTYLE ). Overrides any style specified using -cf- key in locale.
+ Android reference for android.icu.text.NumberFormat.ACCOUNTINGCURRENCYSTYLE.
+ Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
+
- Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
@@ -73,9 +76,12 @@
8
- To be added.
+
+ [icu] Constant to specify currency cash style of format which uses currency ISO code to represent currency, for example: "NT$3" instead of "NT$3.23".
+ Android reference for android.icu.text.NumberFormat.CASHCURRENCYSTYLE.
+ Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
+
- Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
@@ -104,9 +110,12 @@
1
- To be added.
+
+ [icu] Constant to specify general currency style of format. Defaults to STANDARDCURRENCYSTYLE, using currency symbol, for example "$3.00", with non-accounting style for negative values (e.g. minus sign). The specific style may be specified using the -cf- locale key.
+ Android reference for android.icu.text.NumberFormat.CURRENCYSTYLE.
+ Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
+
- Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
@@ -135,9 +144,12 @@
4
- To be added.
+
+ [icu] Constant to specify a integer number style format.
+ Android reference for android.icu.text.NumberFormat.INTEGERSTYLE.
+ Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
+
- Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
@@ -166,9 +178,12 @@
5
- To be added.
+
+ [icu] Constant to specify currency style of format which uses currency ISO code to represent currency, for example: "USD3.00".
+ Android reference for android.icu.text.NumberFormat.ISOCURRENCYSTYLE.
+ Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
+
- Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
@@ -197,9 +212,12 @@
0
- To be added.
+
+ [icu] Constant to specify normal number style of format.
+ Android reference for android.icu.text.NumberFormat.NUMBERSTYLE.
+ Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
+
- Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
@@ -228,9 +246,12 @@
2
- To be added.
+
+ [icu] Constant to specify a style of format to display percent.
+ Android reference for android.icu.text.NumberFormat.PERCENTSTYLE.
+ Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
+
- Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
@@ -259,9 +280,12 @@
6
- To be added.
+
+ [icu] Constant to specify currency style of format which uses currency long name with plural format to represent currency, for example, "3.00 US Dollars".
+ Android reference for android.icu.text.NumberFormat.PLURALCURRENCYSTYLE.
+ Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
+
- Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
@@ -290,9 +314,12 @@
3
- To be added.
+
+ [icu] Constant to specify a style of format to display scientific number.
+ Android reference for android.icu.text.NumberFormat.SCIENTIFICSTYLE.
+ Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
+
- Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
@@ -321,9 +348,12 @@
9
- To be added.
+
+ [icu] Constant to specify currency style of format which uses currency symbol to represent currency, for example "$3.00", using non-accounting style for negative values (e.g. minus sign). Overrides any style specified using -cf- key in locale.
+ Android reference for android.icu.text.NumberFormat.STANDARDCURRENCYSTYLE.
+ Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
+
- Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
diff --git a/docs/xml/Android.Icu.Text/PadPosition.xml b/docs/xml/Android.Icu.Text/PadPosition.xml
index a45da29b3..d24dfbf8f 100644
--- a/docs/xml/Android.Icu.Text/PadPosition.xml
+++ b/docs/xml/Android.Icu.Text/PadPosition.xml
@@ -42,9 +42,12 @@
1
- To be added.
+
+ [icu] Constant for getPadPosition() and setPadPosition(int) to specify pad characters inserted after the prefix.
+ Android reference for android.icu.text.DecimalFormat.PAD_AFTER_PREFIX.
+ Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
+
- Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
@@ -73,9 +76,12 @@
3
- To be added.
+
+ [icu] Constant for getPadPosition() and setPadPosition(int) to specify pad characters inserted after the suffix.
+ Android reference for android.icu.text.DecimalFormat.PAD_AFTER_SUFFIX.
+ Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
+
- Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
@@ -104,9 +110,12 @@
0
- To be added.
+
+ [icu] Constant for getPadPosition() and setPadPosition(int) to specify pad characters inserted before the prefix.
+ Android reference for android.icu.text.DecimalFormat.PAD_BEFORE_PREFIX.
+ Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
+
- Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
@@ -135,9 +144,12 @@
2
- To be added.
+
+ [icu] Constant for getPadPosition() and setPadPosition(int) to specify pad characters inserted before the suffix.
+ Android reference for android.icu.text.DecimalFormat.PAD_BEFORE_SUFFIX.
+ Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
+
- Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
diff --git a/docs/xml/Android.Icu.Text/PluralFormat.xml b/docs/xml/Android.Icu.Text/PluralFormat.xml
index fddb71952..1520ece37 100644
--- a/docs/xml/Android.Icu.Text/PluralFormat.xml
+++ b/docs/xml/Android.Icu.Text/PluralFormat.xml
@@ -474,10 +474,12 @@
- To be added.
- To be added.
- To be added.
+ the default number formatting will be done using this locale.
+ The plural type (e.g., cardinal or ordinal).
+ Creates a new PluralFormat for the plural type.
+ Creates a new PluralFormat for the plural type. The standard number formatting will be done using the given locale.
+ Android reference for android.icu.text.PluralFormat.PluralFormat.
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
@@ -603,10 +605,12 @@
- To be added.
- To be added.
- To be added.
+ the default number formatting will be done using this locale.
+ The plural type (e.g., cardinal or ordinal).
+ Creates a new PluralFormat for the plural type.
+ Creates a new PluralFormat for the plural type. The standard number formatting will be done using the given Locale.
+ Android reference for android.icu.text.PluralFormat.PluralFormat.
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
@@ -710,11 +714,13 @@
- To be added.
- To be added.
- To be added.
- To be added.
+ the PluralFormat will be configured with rules for this locale. This locale will also be used for standard number formatting.
+ The plural type (e.g., cardinal or ordinal).
+ the pattern for this PluralFormat.
+ Creates a new PluralFormat for a plural type, a pattern and a locale.
+ Creates a new PluralFormat for a plural type, a pattern and a locale.
+ Android reference for android.icu.text.PluralFormat.PluralFormat.
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
diff --git a/docs/xml/Android.Icu.Text/PluralRules.xml b/docs/xml/Android.Icu.Text/PluralRules.xml
index 3bec9c768..ef336d9e5 100644
--- a/docs/xml/Android.Icu.Text/PluralRules.xml
+++ b/docs/xml/Android.Icu.Text/PluralRules.xml
@@ -453,11 +453,13 @@
- To be added.
- To be added.
- To be added.
- To be added.
+ The locale for which a PluralRules object is returned.
+ The plural type (e.g., cardinal or ordinal).
+ Provides access to the predefined PluralRules for a given locale and the plural type.
+ The predefined PluralRules object for this locale. If there's no predefined rules for this locale, the rules for the closest parent in the locale hierarchy that has one will be returned. The final fallback always returns the default rules.
+ Provides access to the predefined PluralRules for a given locale and the plural type. ICU defines plural rules for many locales based on CLDR Language Plural Rules. For these predefined rules, see CLDR page at https://unicode-org.github.io/cldr-staging/charts/latest/supplemental/language_plural_rules.html
+ Android reference for android.icu.text.PluralRules.forLocale.
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
@@ -490,11 +492,13 @@
- To be added.
- To be added.
- To be added.
- To be added.
+ The locale for which a PluralRules object is returned.
+ The plural type (e.g., cardinal or ordinal).
+ Provides access to the predefined PluralRules for a given Locale and the plural type.
+ The predefined PluralRules object for this locale. If there's no predefined rules for this locale, the rules for the closest parent in the locale hierarchy that has one will be returned. The final fallback always returns the default rules.
+ Provides access to the predefined PluralRules for a given Locale and the plural type. ICU defines plural rules for many locales based on CLDR Language Plural Rules. For these predefined rules, see CLDR page at https://unicode-org.github.io/cldr-staging/charts/latest/supplemental/language_plural_rules.html
+ Android reference for android.icu.text.PluralRules.forLocale.
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
diff --git a/docs/xml/Android.Icu.Text/RelativeDateTimeFormatter+FormattedRelativeDateTime.xml b/docs/xml/Android.Icu.Text/RelativeDateTimeFormatter+FormattedRelativeDateTime.xml
index 28e4bfebe..600bc1756 100644
--- a/docs/xml/Android.Icu.Text/RelativeDateTimeFormatter+FormattedRelativeDateTime.xml
+++ b/docs/xml/Android.Icu.Text/RelativeDateTimeFormatter+FormattedRelativeDateTime.xml
@@ -178,11 +178,11 @@
- To be added.
- To be added
- To be added.
+ the index of the char value to be returned
+ Returns the char value at the specified index.
+ the specified char value
- To be added
+ Returns the char value at the specified index. An index ranges from zero to length() - 1. The first char value of the sequence is at index zero, the next at index one, and so on, as for array indexing. If the char value specified by the index is a surrogate, the surrogate value is returned.
Java documentation for android.icu.text.RelativeDateTimeFormatter.FormattedRelativeDateTime.charAt(int).
@@ -307,10 +307,10 @@
- To be added
- To be added.
+ Returns the length of this character sequence.
+ the number of char s in this sequence
- To be added
+ Returns the length of this character sequence. The length is the number of 16-bit char s in the sequence.
Java documentation for android.icu.text.RelativeDateTimeFormatter.FormattedRelativeDateTime.length().
@@ -358,11 +358,11 @@
- To be added.
- To be added
- To be added.
+ The object used for iteration state. This can provide constraints to iterate over only one specific field; see ConstrainedFieldPosition.constrainField.
+ Iterates over field positions in the FormattedValue.
+ true if a new occurrence of the field was found; false otherwise.
- To be added
+ Iterates over field positions in the FormattedValue. This lets you determine the position of specific types of substrings, like a month or a decimal separator. To loop over all field positions:
Java documentation for android.icu.text.RelativeDateTimeFormatter.FormattedRelativeDateTime.nextPosition(android.icu.text.ConstrainedFieldPosition).
@@ -458,12 +458,12 @@
- To be added.
- To be added.
- To be added
- To be added.
+ the start index, inclusive
+ the end index, exclusive
+ Returns a CharSequence that is a subsequence of this sequence.
+ the specified subsequence
- To be added
+ Returns a CharSequence that is a subsequence of this sequence. The subsequence starts with the char value at the specified index and ends with the char value at index end - 1. The length (in char s) of the returned sequence is end - start, so if start == end then an empty sequence is returned.
Java documentation for android.icu.text.RelativeDateTimeFormatter.FormattedRelativeDateTime.subSequence(int, int).
@@ -590,10 +590,10 @@
- To be added
- To be added.
+ Exports the formatted number as an AttributedCharacterIterator.
+ An AttributedCharacterIterator containing full field information.
- To be added
+ Exports the formatted number as an AttributedCharacterIterator. Consider using nextPosition(ConstrainedFieldPosition) if you are trying to get field information.
Java documentation for android.icu.text.RelativeDateTimeFormatter.FormattedRelativeDateTime.toCharacterIterator().
diff --git a/docs/xml/Android.Icu.Text/RelativeDateTimeFormatter.xml b/docs/xml/Android.Icu.Text/RelativeDateTimeFormatter.xml
index 3b378c425..1ba7433d1 100644
--- a/docs/xml/Android.Icu.Text/RelativeDateTimeFormatter.xml
+++ b/docs/xml/Android.Icu.Text/RelativeDateTimeFormatter.xml
@@ -204,11 +204,13 @@
- To be added.
- To be added.
- To be added.
- To be added.
+ NEXT, LAST, THIS, etc.
+ e.g SATURDAY, DAY, MONTH
+ Formats a relative date without a quantity.
+ the formatted string. If direction has a value that is documented as not being fully supported in every locale (for example NEXT_2 or LAST_2) then this function may return null to signal that no formatted string is available.
+ Formats a relative date without a quantity. This method returns a String. To get more information about the formatting result, use formatToValue().
+ Android reference for android.icu.text.RelativeDateTimeFormatter.format.
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
@@ -241,11 +243,15 @@
- To be added.
- To be added.
- To be added.
- To be added.
- To be added.
+ The signed offset for the specified field.
+ The unit to use when formatting the relative date, e.g. RelativeDateTimeUnit.WEEK, RelativeDateTimeUnit.FRIDAY.
+ Format a combination of RelativeDateTimeUnit and numeric offset using a text style if possible, e.g.
+ The formatted string (may be empty in case of error)
+
+ Format a combination of RelativeDateTimeUnit and numeric offset using a text style if possible, e.g. "last week", "this week", "next week", "yesterday", "tomorrow". Falls back to numeric style if no appropriate text term is available for the specified offset in the object’s locale. This method returns a String. To get more information about the formatting result, use formatToValue().
+ Android reference for android.icu.text.RelativeDateTimeFormatter.format.
+ Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
+
@@ -277,12 +283,14 @@
- To be added.
- To be added.
- To be added.
- To be added.
- To be added.
+ The numerical amount e.g 5. This value is formatted according to this object's NumberFormat object.
+ NEXT means a future relative date; LAST means a past relative date.
+ the unit e.g day? month? year?
+ Formats a relative date with a quantity such as "in 5 days" or "3 months ago".
+ the formatted string
+ Formats a relative date with a quantity such as "in 5 days" or "3 months ago". This method returns a String. To get more information about the formatting result, use formatToValue().
+ Android reference for android.icu.text.RelativeDateTimeFormatter.format.
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
@@ -315,11 +323,15 @@
- To be added.
- To be added.
- To be added.
- To be added.
- To be added.
+ The signed offset for the specified unit. This will be formatted according to this object's NumberFormat object.
+ The unit to use when formatting the relative date, e.g. RelativeDateTimeUnit.WEEK, RelativeDateTimeUnit.FRIDAY.
+ Format a combination of RelativeDateTimeUnit and numeric offset using a numeric style, e.g.
+ The formatted string (may be empty in case of error)
+
+ Format a combination of RelativeDateTimeUnit and numeric offset using a numeric style, e.g. "1 week ago", "in 1 week", "5 weeks ago", "in 5 weeks". This method returns a String. To get more information about the formatting result, use formatNumericToValue().
+ Android reference for android.icu.text.RelativeDateTimeFormatter.formatNumeric.
+ Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
+
@@ -350,11 +362,14 @@
- To be added.
- To be added.
- To be added.
- To be added.
- To be added.
+ The signed offset for the specified unit. This will be formatted according to this object's NumberFormat object.
+ The unit to use when formatting the relative date, e.g. RelativeDateTimeUnit.WEEK, RelativeDateTimeUnit.FRIDAY.
+ Format a combination of RelativeDateTimeUnit and numeric offset using a numeric style, e.g.
+ The formatted string (may be empty in case of error)
+ To be added.
+ Android reference for android.icu.text.RelativeDateTimeFormatter.formatNumericToValue.
+ Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
+
@@ -381,9 +396,11 @@
Android.Icu.Text.RelativeDateTimeFormatter+Style
- To be added.
- To be added.
+ Return style
+ The formatting style.
+ Return style
+ Android reference for android.icu.text.RelativeDateTimeFormatter.getFormatStyle.
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
@@ -416,11 +433,15 @@
- To be added.
- To be added.
- To be added.
- To be added.
- To be added.
+ NEXT, LAST, THIS, etc.
+ e.g SATURDAY, DAY, MONTH
+ Formats a relative date without a quantity.
+ the formatted string. If direction has a value that is documented as not being fully supported in every locale (for example NEXT_2 or LAST_2) then this function may return null to signal that no formatted string is available.
+
+ Formats a relative date without a quantity. This method returns a FormattedRelativeDateTime, which exposes more information than the String returned by format().
+ Android reference for android.icu.text.RelativeDateTimeFormatter.formatToValue.
+ Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
+
@@ -451,11 +472,14 @@
- To be added.
- To be added.
- To be added.
- To be added.
- To be added.
+ The signed offset for the specified field.
+ The unit to use when formatting the relative date, e.g. RelativeDateTimeUnit.WEEK, RelativeDateTimeUnit.FRIDAY.
+ Format a combination of RelativeDateTimeUnit and numeric offset using a text style if possible, e.g.
+ The formatted string (may be empty in case of error)
+ To be added.
+ Android reference for android.icu.text.RelativeDateTimeFormatter.formatToValue.
+ Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
+
@@ -487,12 +511,16 @@
- To be added.
- To be added.
- To be added.
- To be added.
- To be added.
- To be added.
+ The numerical amount e.g 5. This value is formatted according to this object's NumberFormat object.
+ NEXT means a future relative date; LAST means a past relative date.
+ the unit e.g day? month? year?
+ Formats a relative date with a quantity such as "in 5 days" or "3 months ago".
+ the formatted relative datetime
+
+ Formats a relative date with a quantity such as "in 5 days" or "3 months ago". This method returns a FormattedRelativeDateTime, which exposes more information than the String returned by format().
+ Android reference for android.icu.text.RelativeDateTimeFormatter.formatToValue.
+ Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
+
@@ -715,13 +743,15 @@
- To be added.
- To be added.
- To be added.
- To be added.
- To be added.
+ the locale
+ the number format object. It is defensively copied to ensure thread-safety and immutability of this class. May be null.
+ the style.
+ the capitalization context.
+ Returns a RelativeDateTimeFormatter for a particular locale that uses a particular NumberFormat object, style, and capitalization context
To be added.
+ Returns a RelativeDateTimeFormatter for a particular locale that uses a particular NumberFormat object, style, and capitalization context
+ Android reference for android.icu.text.RelativeDateTimeFormatter.getInstance.
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
diff --git a/docs/xml/Android.Icu.Text/SearchIterator.xml b/docs/xml/Android.Icu.Text/SearchIterator.xml
index 761736b64..25df3ed3f 100644
--- a/docs/xml/Android.Icu.Text/SearchIterator.xml
+++ b/docs/xml/Android.Icu.Text/SearchIterator.xml
@@ -391,9 +391,11 @@
- To be added.
+ Returns the collation element comparison type.
To be added.
+ Returns the collation element comparison type.
+ Android reference for android.icu.text.SearchIterator.getElementComparisonType.
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
@@ -532,9 +534,11 @@
System.Int32
- To be added.
- To be added.
+ Return the current index in the text being searched.
+ current index in the text being searched.
+ Return the current index in the text being searched. If the iteration has gone past the end of the text (or past the beginning for a backwards search), DONE is returned.
+ Android reference for android.icu.text.SearchIterator.getIndex.
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
@@ -1060,8 +1064,10 @@
To be added.
- To be added.
+ Sets the collation element comparison type.
+ Sets the collation element comparison type. The default comparison type is ElementComparisonType.STANDARD_ELEMENT_COMPARISON.
+ Android reference for android.icu.text.SearchIterator.setElementComparisonType.
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
diff --git a/docs/xml/Android.Icu.Text/SimpleDateFormat.xml b/docs/xml/Android.Icu.Text/SimpleDateFormat.xml
index 45b13766a..bf7534d64 100644
--- a/docs/xml/Android.Icu.Text/SimpleDateFormat.xml
+++ b/docs/xml/Android.Icu.Text/SimpleDateFormat.xml
@@ -1065,9 +1065,9 @@
- To be added.
- To be added.
- To be added.
+ The date/time string to be parsed
+ The calendar set on input to the date and time to be used for missing values in the date/time string being parsed, and set on output to the parsed date/time. In general, this should be initialized before calling this method - either cleared or set to the current date, depending on desired behavior. If this parse fails, the calendar may still have been modified. When the calendar type is different from the internal calendar held by this DateFormat instance, calendar field values will be parsed based on the internal calendar initialized with the time and the time zone taken from this calendar, then the parse result (time in milliseconds and time zone) will be set back to this calendar.
+ On input, the position at which to start parsing; on output, the position at which parsing terminated, or the start position if the parse failed.
Overrides DateFormat
Overrides DateFormat
@@ -1111,10 +1111,12 @@
- To be added.
- To be added.
- To be added.
+ The pattern character
+ Returns a DateFormat.Field constant associated with the specified format pattern character.
+ DateFormat.Field associated with the pattern character
+ Returns a DateFormat.Field constant associated with the specified format pattern character.
+ Android reference for android.icu.text.SimpleDateFormat.patternCharToDateFormatField.
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
diff --git a/docs/xml/Android.Icu.Text/StringSearch.xml b/docs/xml/Android.Icu.Text/StringSearch.xml
index 668da19f5..b82a13586 100644
--- a/docs/xml/Android.Icu.Text/StringSearch.xml
+++ b/docs/xml/Android.Icu.Text/StringSearch.xml
@@ -531,11 +531,11 @@
- To be added.
- To be added
- To be added.
+ The index in the target text at which the search should start.
+ Abstract method which subclasses override to provide the mechanism for finding the next match in the target text.
+ index at which the match starts, else if match is not found DONE is returned
- To be added
+ Abstract method which subclasses override to provide the mechanism for finding the next match in the target text. This allows different subclasses to provide different search algorithms. If a match is found, the implementation should return the index at which the match starts and should call setMatchLength(int) with the number of characters in the target text that make up the match. If no match is found, the method should return DONE.
Java documentation for android.icu.text.StringSearch.handleNext(int).
@@ -576,11 +576,11 @@
- To be added.
- To be added
- To be added.
+ The index in the target text at which the search should start.
+ Abstract method which subclasses override to provide the mechanism for finding the previous match in the target text.
+ index at which the match starts, else if match is not found DONE is returned
- To be added
+ Abstract method which subclasses override to provide the mechanism for finding the previous match in the target text. This allows different subclasses to provide different search algorithms. If a match is found, the implementation should return the index at which the match starts and should call setMatchLength(int) with the number of characters in the target text that make up the match. If no match is found, the method should return DONE.
Java documentation for android.icu.text.StringSearch.handlePrevious(int).
@@ -618,10 +618,10 @@
System.Int32
- To be added
- To be added.
+ Return the current index in the text being searched.
+ current index in the text being searched.
- To be added
+ Return the current index in the text being searched. If the iteration has gone past the end of the text (or past the beginning for a backwards search), DONE is returned.
Java documentation for android.icu.text.StringSearch.getIndex().
diff --git a/docs/xml/Android.Icu.Text/TimeZoneFormat.xml b/docs/xml/Android.Icu.Text/TimeZoneFormat.xml
index 704281252..103f2b65f 100644
--- a/docs/xml/Android.Icu.Text/TimeZoneFormat.xml
+++ b/docs/xml/Android.Icu.Text/TimeZoneFormat.xml
@@ -213,10 +213,10 @@
- To be added
+ Provides for the clone operation.
To be added.
- To be added
+ Provides for the clone operation. Any clone is initially unfrozen.
Java documentation for android.icu.text.TimeZoneFormat.cloneAsThawed().
@@ -300,12 +300,14 @@
- To be added.
- To be added.
- To be added.
- To be added.
- To be added.
+ the style enum (e.g. GENERIC_LONG, LOCALIZED_GMT...)
+ the time zone.
+ the date.
+ Returns the display name of the time zone at the given date for the style.
+ the display name of the time zone.
+ Returns the display name of the time zone at the given date for the style. Note: A style may have fallback styles defined. For example, when GENERIC_LONG is requested, but there is no display name data available for GENERIC_LONG style, the implementation may use GENERIC_LOCATION or LOCALIZED_GMT. See UTS#35 UNICODE LOCALE DATA MARKUP LANGUAGE (LDML) Appendix J: Time Zone Display Name for the details.
+ Android reference for android.icu.text.TimeZoneFormat.format.
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
@@ -339,13 +341,13 @@
- To be added.
- To be added.
- To be added.
- To be added
- To be added.
+ The object to format
+ where the text is to be appended
+ A FieldPosition identifying a field in the formatted text
+ Formats an object and appends the resulting text to a given string buffer.
+ the string buffer passed in as toAppendTo, with formatted text appended
- To be added
+ Formats an object and appends the resulting text to a given string buffer. If the pos argument identifies a field used by the format, then its indices are set to the beginning and end of the first such field encountered.
Java documentation for android.icu.text.TimeZoneFormat.format(java.lang.Object, java.lang.StringBuffer, java.text.FieldPosition).
@@ -389,13 +391,15 @@
- To be added.
- To be added.
- To be added.
- To be added.
- To be added.
- To be added.
+ the style enum (e.g. GENERIC_LONG, LOCALIZED_GMT...)
+ the time zone.
+ the date.
+ the output argument for receiving the time type (standard/daylight/unknown) used for the display name, or specify null if the information is not necessary.
+ Returns the display name of the time zone at the given date for the style.
+ the display name of the time zone.
+ Returns the display name of the time zone at the given date for the style. This method takes an extra argument Output<TimeType> timeType in addition to the argument list of format(Style,TimeZone,long). The argument is used for receiving the time type (standard time or daylight saving time, or unknown) actually used for the display name.
+ Android reference for android.icu.text.TimeZoneFormat.format.
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
@@ -639,10 +643,10 @@
- To be added
- To be added.
+ Freezes the object.
+ the object itself.
- To be added
+ Freezes the object.
Java documentation for android.icu.text.TimeZoneFormat.freeze().
@@ -683,10 +687,12 @@
- To be added.
- To be added.
+ the offset pattern enum
+ Returns the offset pattern used for localized GMT format.
To be added.
+ Returns the offset pattern used for localized GMT format.
+ Android reference for android.icu.text.TimeZoneFormat.getGMTOffsetPattern.
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
@@ -941,10 +947,10 @@
System.Boolean
- To be added
+ Determines whether the object has been frozen or not.
To be added.
- To be added
+ Determines whether the object has been frozen or not.
Java documentation for android.icu.text.TimeZoneFormat.isFrozen().
@@ -1149,13 +1155,15 @@
- To be added.
- To be added.
- To be added.
- To be added.
- To be added.
- To be added.
+ the format style
+ the text contains a time zone string at the position.
+ the position.
+ The output argument for receiving the time type (standard/daylight/unknown), or specify null if the information is not necessary.
+ Returns a TimeZone by parsing the time zone string according to the parse position, the style and the default parse options.
+ A TimeZone, or null if the input could not be parsed.
+ Returns a TimeZone by parsing the time zone string according to the parse position, the style and the default parse options. Note: This method is equivalent to parse(style, text, pos, null, timeType).
+ Android reference for android.icu.text.TimeZoneFormat.parse.
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
@@ -1191,14 +1199,16 @@
- To be added.
- To be added.
- To be added.
- To be added.
- To be added.
- To be added.
- To be added.
+ the format style.
+ the text contains a time zone string at the position.
+ the position.
+ the parse options.
+ The output argument for receiving the time type (standard/daylight/unknown), or specify null if the information is not necessary.
+ Returns a TimeZone by parsing the time zone string according to the parse position, the style and the parse options.
+ A TimeZone, or null if the input could not be parsed.
+ Returns a TimeZone by parsing the time zone string according to the parse position, the style and the parse options.
+ Android reference for android.icu.text.TimeZoneFormat.parse.
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
@@ -1231,12 +1241,12 @@
- To be added.
- To be added.
- To be added
- To be added.
+ A String, part of which should be parsed.
+ A ParsePosition object with index and error index information as described above.
+ Parses text from a string to produce an object.
+ An Object parsed from the string. In case of error, returns null.
- To be added
+ Parses text from a string to produce an object. The method attempts to parse text starting at the index given by pos. If parsing succeeds, then the index of pos is updated to the index after the last character used (parsing does not necessarily use all characters up to the end of the string), and the parsed object is returned. The updated pos can be used to indicate the starting point for the next call to this method. If an error occurs, then the index of pos is not changed, the error index of pos is set to the index of the character where the error occurred, and null is returned.
Java documentation for android.icu.text.TimeZoneFormat.parseObject(java.lang.String, java.text.ParsePosition).
@@ -1527,11 +1537,13 @@
- To be added.
- To be added.
- To be added.
- To be added.
+ the offset pattern.
+ the pattern string.
+ Sets the offset pattern for the given offset type.
+ this object.
+ Sets the offset pattern for the given offset type.
+ Android reference for android.icu.text.TimeZoneFormat.setGMTOffsetPattern.
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
diff --git a/docs/xml/Android.Icu.Text/TimeZoneNames.xml b/docs/xml/Android.Icu.Text/TimeZoneNames.xml
index 3d1c88f2a..16dd4e885 100644
--- a/docs/xml/Android.Icu.Text/TimeZoneNames.xml
+++ b/docs/xml/Android.Icu.Text/TimeZoneNames.xml
@@ -152,9 +152,11 @@
System.Collections.Generic.ICollection<System.String>
- To be added.
- To be added.
+ Returns an immutable set of all available meta zone IDs.
+ An immutable set of all available meta zone IDs.
+ Returns an immutable set of all available meta zone IDs.
+ Android reference for android.icu.text.TimeZoneNames.getAvailableMetaZoneIDs.
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
@@ -239,12 +241,14 @@
- To be added.
- To be added.
- To be added.
- To be added.
- To be added.
+ The canonical time zone ID.
+ The display name type. See TimeZoneNames.NameType.
+ The date
+ Returns the display name of the time zone at the given date.
+ The display name for the time zone at the given date. When this object does not have a localized display name for the time zone with the specified type and date, null is returned.
+ Returns the display name of the time zone at the given date. Note: This method calls the subclass's getTimeZoneDisplayName(String,NameType) first. When the result is null, this method calls getMetaZoneID(String,long) to get the meta zone ID mapped from the time zone, then calls getMetaZoneDisplayName(String,NameType).
+ Android reference for android.icu.text.TimeZoneNames.getDisplayName.
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
@@ -425,11 +429,13 @@
- To be added.
- To be added.
- To be added.
- To be added.
+ The meta zone ID.
+ The display name type. See TimeZoneNames.NameType.
+ Returns the display name of the meta zone.
+ The display name of the meta zone. When this object does not have a localized display name for the given meta zone with the specified type or the implementation does not provide any display names associated with meta zones, null is returned.
+ Returns the display name of the meta zone.
+ Android reference for android.icu.text.TimeZoneNames.getMetaZoneDisplayName.
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
@@ -563,11 +569,13 @@
- To be added.
- To be added.
- To be added.
- To be added.
+ The canonical time zone ID.
+ The display name type. See TimeZoneNames.NameType.
+ Returns the display name of the time zone.
+ The display name for the time zone. When this object does not have a localized display name for the given time zone with the specified type, null is returned.
+ Returns the display name of the time zone. Unlike getDisplayName(String,NameType,long), this method does not get a name from a meta zone used by the time zone.
+ Android reference for android.icu.text.TimeZoneNames.getTimeZoneDisplayName.
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
diff --git a/docs/xml/Android.Icu.Text/Transliterator+Position.xml b/docs/xml/Android.Icu.Text/Transliterator+Position.xml
index 80be62aea..706d0b591 100644
--- a/docs/xml/Android.Icu.Text/Transliterator+Position.xml
+++ b/docs/xml/Android.Icu.Text/Transliterator+Position.xml
@@ -128,8 +128,12 @@
To be added.
- To be added.
- To be added.
+ Constructs a Position object that is a copy of another.
+
+ Constructs a Position object that is a copy of another.
+ Android reference for android.icu.text.Transliterator.Position.Position.
+ Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
+
@@ -447,8 +451,12 @@
To be added.
- To be added.
- To be added.
+ Copies the indices of this position from another.
+
+ Copies the indices of this position from another.
+ Android reference for android.icu.text.Transliterator.Position.set.
+ Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
+
diff --git a/docs/xml/Android.Icu.Text/Transliterator.xml b/docs/xml/Android.Icu.Text/Transliterator.xml
index 093de8ead..954d677d3 100644
--- a/docs/xml/Android.Icu.Text/Transliterator.xml
+++ b/docs/xml/Android.Icu.Text/Transliterator.xml
@@ -518,11 +518,15 @@
- To be added.
- To be added.
- To be added.
- To be added.
- To be added.
+ the text to be transliterated
+ the position indices
+ if true, then assume more characters may be inserted at index.limit, and postpone processing to accommodate future incoming characters
+ Transliterate a substring of text, as specified by index, taking filters into account.
+
+ Transliterate a substring of text, as specified by index, taking filters into account. This method is for subclasses that need to delegate to another transliterator.
+ Android reference for android.icu.text.Transliterator.filteredTransliterate.
+ Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
+
@@ -553,10 +557,13 @@
- To be added.
- To be added.
- To be added.
- To be added.
+ the buffer holding transliterated and untransliterated text.
+ the array of indices previously passed to transliterate(Replaceable)
+ Finishes any pending transliterations that were waiting for more characters.
+ To be added.
+ Android reference for android.icu.text.Transliterator.finishTransliteration.
+ Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
+
@@ -1584,10 +1591,14 @@
- To be added.
- To be added.
- To be added.
- To be added.
+ the buffer holding transliterated and untransliterated text
+ the start and limit of the text, the position of the cursor, and the start and limit of transliteration.
+ Transliterates the portion of the text buffer that can be transliterated unambiguosly.
+
+ Transliterates the portion of the text buffer that can be transliterated unambiguosly. This is a convenience method; see transliterate(Replaceable,Transliterator.Position,String) for details.
+ Android reference for android.icu.text.Transliterator.transliterate.
+ Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
+
@@ -1619,11 +1630,15 @@
- To be added.
- To be added.
- To be added.
- To be added.
- To be added.
+ the buffer holding transliterated and untransliterated text
+ the start and limit of the text, the position of the cursor, and the start and limit of transliteration.
+ text to be inserted and possibly transliterated into the translation buffer at index.contextLimit.
+ Transliterates the portion of the text buffer that can be transliterated unambiguosly after a new character has been inserted, typically as a result of a keyboard event.
+
+ Transliterates the portion of the text buffer that can be transliterated unambiguosly after a new character has been inserted, typically as a result of a keyboard event. This is a convenience method; see transliterate(Replaceable,Transliterator.Position,String) for details.
+ Android reference for android.icu.text.Transliterator.transliterate.
+ Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
+
@@ -1655,11 +1670,14 @@
- To be added.
- To be added.
- To be added.
- To be added.
- To be added.
+ the buffer holding transliterated and untransliterated text
+ the start and limit of the text, the position of the cursor, and the start and limit of transliteration.
+ text to be inserted and possibly transliterated into the translation buffer at index.contextLimit. If null then no text is inserted.
+ Transliterates the portion of the text buffer that can be transliterated unambiguosly after new text has been inserted, typically as a result of a keyboard event.
+ To be added.
+ Android reference for android.icu.text.Transliterator.transliterate.
+ Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
+
diff --git a/docs/xml/Android.Icu.Text/UCharacterIterator.xml b/docs/xml/Android.Icu.Text/UCharacterIterator.xml
index 854f9abc7..5057171b7 100644
--- a/docs/xml/Android.Icu.Text/UCharacterIterator.xml
+++ b/docs/xml/Android.Icu.Text/UCharacterIterator.xml
@@ -321,8 +321,10 @@
-1
- To be added.
+ Indicator that we have reached the ends of the UTF16 text.
+ Indicator that we have reached the ends of the UTF16 text.
+ Android reference for android.icu.text.UCharacterIterator.DONE.
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
@@ -744,9 +746,11 @@
System.Int32
- To be added.
- To be added.
+ Gets the current index in text.
+ current index in text.
+ Gets the current index in text.
+ Android reference for android.icu.text.UCharacterIterator.getIndex.
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
@@ -839,9 +843,11 @@
System.Int32
- To be added.
- To be added.
+ Returns the length of the text
+ length of the text
+ Returns the length of the text
+ Android reference for android.icu.text.UCharacterIterator.getLength.
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
diff --git a/docs/xml/Android.Icu.Text/UnicodeFilter.xml b/docs/xml/Android.Icu.Text/UnicodeFilter.xml
index f6d48c6c5..220ab4b39 100644
--- a/docs/xml/Android.Icu.Text/UnicodeFilter.xml
+++ b/docs/xml/Android.Icu.Text/UnicodeFilter.xml
@@ -285,13 +285,13 @@
- To be added.
- To be added.
- To be added.
- To be added.
+ the text to be matched
+ on input, the index into text at which to begin matching. On output, the limit of the matched text. The number of matched characters is the output value of offset minus the input value. Offset should always point to the HIGH SURROGATE (leading code unit) of a pair of surrogates, both on entry and upon return.
+ the limit index of text to be matched. Greater than offset for a forward direction match, less than offset for a backward direction match. The last character to be considered for matching will be text.charAt(limit-1) in the forward direction or text.charAt(limit+1) in the backward direction.
+ if true, then assume further characters may be inserted at limit and check for partial matching. Otherwise assume the text as given is complete.
Default implementation of UnicodeMatcher::matches() for Unicode
filters.
- To be added.
+ a match degree value indicating a full match, a partial match, or a mismatch. If incremental is false then U_PARTIAL_MATCH should never be returned.
Default implementation of UnicodeMatcher::matches() for Unicode
filters. Matches a single 16-bit code unit at offset.
diff --git a/docs/xml/Android.Icu.Text/UnicodeMatchResult.xml b/docs/xml/Android.Icu.Text/UnicodeMatchResult.xml
index 45f4572bc..6bc84fb6e 100644
--- a/docs/xml/Android.Icu.Text/UnicodeMatchResult.xml
+++ b/docs/xml/Android.Icu.Text/UnicodeMatchResult.xml
@@ -42,9 +42,12 @@
2
- To be added.
+
+ Constant returned by matches() indicating a complete match between the text and this matcher. For an incremental variable-length match, this value is returned if the given text matches, and it is known that additional characters would not alter the extent of the match.
+ Android reference for android.icu.text.UnicodeMatcher.U_MATCH.
+ Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
+
- Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
@@ -73,9 +76,12 @@
0
- To be added.
+
+ Constant returned by matches() indicating a mismatch between the text and this matcher. The text contains a character which does not match, or the text does not contain all desired characters for a non-incremental match.
+ Android reference for android.icu.text.UnicodeMatcher.U_MISMATCH.
+ Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
+
- Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
@@ -104,9 +110,12 @@
1
- To be added.
+
+ Constant returned by matches() indicating a partial match between the text and this matcher. This value is only returned for incremental match operations. All characters of the text match, but more characters are required for a complete match. Alternatively, for variable-length matchers, all characters of the text match, and if more characters were supplied at limit, they might also match.
+ Android reference for android.icu.text.UnicodeMatcher.U_PARTIAL_MATCH.
+ Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
+
- Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
diff --git a/docs/xml/Android.Icu.Text/UnicodeSet.xml b/docs/xml/Android.Icu.Text/UnicodeSet.xml
index 26a54e7c6..87bcdecd9 100644
--- a/docs/xml/Android.Icu.Text/UnicodeSet.xml
+++ b/docs/xml/Android.Icu.Text/UnicodeSet.xml
@@ -2137,7 +2137,7 @@
Return a new set that is equivalent to this one.
- To be added.
+ a clone of this instance.
Return a new set that is equivalent to this one.
@@ -2415,9 +2415,11 @@
To be added.
To be added.
- To be added.
+ Compares UnicodeSets, in three different ways.
To be added.
+ Compares UnicodeSets, in three different ways.
+ Android reference for android.icu.text.UnicodeSet.compareTo.
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
@@ -4200,7 +4202,7 @@
Returns a string iterator.
- To be added.
+ an Iterator.
Returns a string iterator. Uses the same order of iteration as UnicodeSetIterator.
<b>Warning: </b>For speed, UnicodeSet iteration does not check for concurrent modification.
@@ -5602,11 +5604,13 @@
- To be added.
- To be added.
- To be added.
- To be added.
+ The string to be spanned
+ The span condition
+ Span a string using this UnicodeSet.
+ the length of the span
+ Span a string using this UnicodeSet. To replace, count elements, or delete spans, see UnicodeSetSpanner.
+ Android reference for android.icu.text.UnicodeSet.span.
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
@@ -5673,12 +5677,14 @@
- To be added.
- To be added.
- To be added.
- To be added.
- To be added.
+ The string to be spanned
+ The start index that the span begins
+ The span condition
+ Span a string using this UnicodeSet.
+ the string index which ends the span (i.e. exclusive)
+ Span a string using this UnicodeSet. If the start index is less than 0, span will start from 0. If the start index is greater than the string length, span returns the string length. To replace, count elements, or delete spans, see UnicodeSetSpanner.
+ Android reference for android.icu.text.UnicodeSet.span.
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
@@ -5746,11 +5752,13 @@
- To be added.
- To be added.
- To be added.
- To be added.
+ The string to be spanned
+ The span condition
+ Span a string backwards (from the end) using this UnicodeSet.
+ The string index which starts the span (i.e. inclusive).
+ Span a string backwards (from the end) using this UnicodeSet. To replace, count elements, or delete spans, see UnicodeSetSpanner.
+ Android reference for android.icu.text.UnicodeSet.spanBack.
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
@@ -5817,12 +5825,14 @@
- To be added.
- To be added.
- To be added.
- To be added.
- To be added.
+ The string to be spanned
+ The index of the char (exclusive) that the string should be spanned backwards
+ The span condition
+ Span a string backwards (from the fromIndex) using this UnicodeSet.
+ The string index which starts the span (i.e. inclusive).
+ Span a string backwards (from the fromIndex) using this UnicodeSet. If the fromIndex is less than 0, spanBack will return 0. If fromIndex is greater than the string length, spanBack will start from the string length. To replace, count elements, or delete spans, see UnicodeSetSpanner.
+ Android reference for android.icu.text.UnicodeSet.spanBack.
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
diff --git a/docs/xml/Android.Icu.Text/UnicodeSetOptions.xml b/docs/xml/Android.Icu.Text/UnicodeSetOptions.xml
index aa4058edb..b2af581d6 100644
--- a/docs/xml/Android.Icu.Text/UnicodeSetOptions.xml
+++ b/docs/xml/Android.Icu.Text/UnicodeSetOptions.xml
@@ -42,9 +42,12 @@
4
- To be added.
+
+ Adds all case mappings for each element in the set. This adds the full lower-, title-, and uppercase mappings as well as the full case folding of each existing element in the set. This value is an options bit set value for some constructors, applyPattern(), and closeOver(). It can be ORed together with other, unrelated options. Unlike the “case insensitive” options, this does not perform a closure. For example, it does not add 'ſ' (U+017F long s) for 's', 'K' (U+212A Kelvin sign) for 'k', or replace set strings by their case-folded versions.
+ Android reference for android.icu.text.UnicodeSet.ADD_CASE_MAPPINGS.
+ Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
+
- Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
@@ -73,9 +76,13 @@
2
- To be added.
+
+ This constant was deprecated in API level 35. ICU 73 Use CASE_INSENSITIVE instead.
+ Alias for CASE_INSENSITIVE.
+ Android reference for android.icu.text.UnicodeSet.CASE.
+ Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
+
- Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
@@ -104,9 +111,12 @@
2
- To be added.
+
+ Enable case insensitive matching. E.g., "[ab]" with this flag will match 'a', 'A', 'b', and 'B'. "[^ab]" with this flag will match all except 'a', 'A', 'b', and 'B'. This performs a full closure over case mappings, e.g. 'ſ' (U+017F long s) for 's'. This value is an options bit set value for some constructors, applyPattern(), and closeOver(). It can be ORed together with other, unrelated options. The resulting set is a superset of the input for the code points but not for the strings. It performs a case mapping closure of the code points and adds full case folding strings for the code points, and reduces strings of the original set to their full case folding equivalents. This is designed for case-insensitive matches, for example in regular expressions. The full code point case closure allows checking of an input character directly against the closure set. Strings are matched by comparing the case-folded form from the closure set with an incremental case folding of the string in question. The closure set will also contain single code points if the original set contained case-equivalent strings (like U+00DF for "ss" or "Ss" etc.). This is not necessary (that is, redundant) for the above matching method but results in the same closure sets regardless of whether the original set contained the code point or a string.
+ Android reference for android.icu.text.UnicodeSet.CASE_INSENSITIVE.
+ Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
+
- Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
@@ -135,9 +145,12 @@
1
- To be added.
+
+ Bitmask for constructor and applyPattern() indicating that white space should be ignored. If set, ignore Unicode Pattern_White_Space characters, unless they are quoted or escaped. This may be ORed together with other selectors.
+ Android reference for android.icu.text.UnicodeSet.IGNORE_SPACE.
+ Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
+
- Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
@@ -166,7 +179,11 @@
6
- To be added.
+
+ Enable case insensitive matching. Same as CASE_INSENSITIVE but using only Simple_Case_Folding (scf) mappings, which map each code point to one code point, not full Case_Folding (cf) mappings, which map some code points to multiple code points. This is designed for case-insensitive matches, for example in certain regular expression implementations where only Simple_Case_Folding mappings are used, such as in ECMAScript (JavaScript) regular expressions. This value is an options bit set value for some constructors, applyPattern(), and closeOver(). It can be ORed together with other, unrelated options.
+ Android reference for android.icu.text.UnicodeSet.SIMPLE_CASE_INSENSITIVE.
+ Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
+
diff --git a/docs/xml/Android.Icu.Text/UnicodeSetSpanner.xml b/docs/xml/Android.Icu.Text/UnicodeSetSpanner.xml
index 4a0fda695..e978c639f 100644
--- a/docs/xml/Android.Icu.Text/UnicodeSetSpanner.xml
+++ b/docs/xml/Android.Icu.Text/UnicodeSetSpanner.xml
@@ -257,11 +257,13 @@
- To be added.
- To be added.
- To be added.
- To be added.
+ the sequence to count characters in
+ whether to treat an entire span as a match, or individual elements as matches
+ Returns the number of matching characters found in a character sequence, using SpanCondition.SIMPLE.
+ the count. Zero if there are none.
+ Returns the number of matching characters found in a character sequence, using SpanCondition.SIMPLE. The code alternates spans; see the class doc for UnicodeSetSpanner for a note about boundary conditions.
+ Android reference for android.icu.text.UnicodeSetSpanner.countIn.
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
@@ -328,12 +330,14 @@
- To be added.
- To be added.
- To be added.
- To be added.
- To be added.
+ the sequence to count characters in
+ whether to treat an entire span as a match, or individual elements as matches
+ the spanCondition to use. SIMPLE or CONTAINED means only count the elements in the span; NOT_CONTAINED is the reverse. WARNING: when a UnicodeSet contains strings, there may be unexpected behavior in edge cases.
+ Returns the number of matching characters found in a character sequence.
+ the count. Zero if there are none.
+ Returns the number of matching characters found in a character sequence. The code alternates spans; see the class doc for UnicodeSetSpanner for a note about boundary conditions.
+ Android reference for android.icu.text.UnicodeSetSpanner.countIn.
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
@@ -489,11 +493,13 @@
- To be added.
- To be added.
- To be added.
- To be added.
+ charsequence to replace matching spans in.
+ specify whether to modify the matching spans (CONTAINED or SIMPLE) or the non-matching (NOT_CONTAINED)
+ Delete all matching spans in sequence, according to the spanCondition.
+ modified string.
+ Delete all matching spans in sequence, according to the spanCondition. The code alternates spans; see the class doc for UnicodeSetSpanner for a note about boundary conditions.
+ Android reference for android.icu.text.UnicodeSetSpanner.deleteFrom.
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
@@ -695,12 +701,14 @@
- To be added.
- To be added.
- To be added.
- To be added.
- To be added.
+ charsequence to replace matching spans in.
+ replacement sequence. To delete, use ""
+ whether to treat an entire span as a match, or individual elements as matches
+ Replace all matching spans in sequence by replacement, according to the CountMethod, using SpanCondition.SIMPLE.
+ modified string.
+ Replace all matching spans in sequence by replacement, according to the CountMethod, using SpanCondition.SIMPLE. The code alternates spans; see the class doc for UnicodeSetSpanner for a note about boundary conditions.
+ Android reference for android.icu.text.UnicodeSetSpanner.replaceFrom.
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
@@ -770,13 +778,15 @@
- To be added.
- To be added.
- To be added.
- To be added.
- To be added.
- To be added.
+ charsequence to replace matching spans in.
+ replacement sequence. To delete, use ""
+ whether to treat an entire span as a match, or individual elements as matches
+ specify whether to modify the matching spans (CONTAINED or SIMPLE) or the non-matching (NOT_CONTAINED)
+ Replace all matching spans in sequence by replacement, according to the countMethod and spanCondition.
+ modified string.
+ Replace all matching spans in sequence by replacement, according to the countMethod and spanCondition. The code alternates spans; see the class doc for UnicodeSetSpanner for a note about boundary conditions.
+ Android reference for android.icu.text.UnicodeSetSpanner.replaceFrom.
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
@@ -1082,11 +1092,13 @@
- To be added.
- To be added.
- To be added.
- To be added.
+ the sequence to trim
+ LEADING, TRAILING, or BOTH
+ Returns a trimmed sequence (using CharSequence.subsequence()), that omits matching elements at the start or end of the string, using the trimOption and SpanCondition.SIMPLE.
+ a subsequence
+ Returns a trimmed sequence (using CharSequence.subsequence()), that omits matching elements at the start or end of the string, using the trimOption and SpanCondition.SIMPLE. For example:... returns "catbab".
+ Android reference for android.icu.text.UnicodeSetSpanner.trim.
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
@@ -1120,12 +1132,14 @@
- To be added.
- To be added.
- To be added.
- To be added.
- To be added.
+ the sequence to trim
+ LEADING, TRAILING, or BOTH
+ SIMPLE, CONTAINED or NOT_CONTAINED
+ Returns a trimmed sequence (using CharSequence.subsequence()), that omits matching elements at the start or end of the string, depending on the trimOption and spanCondition.
+ a subsequence
+ Returns a trimmed sequence (using CharSequence.subsequence()), that omits matching elements at the start or end of the string, depending on the trimOption and spanCondition. For example:... returns "catbab".
+ Android reference for android.icu.text.UnicodeSetSpanner.trim.
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
From 22ece7acee6d5c261b9141c6eada550ba5e9f5b1 Mon Sep 17 00:00:00 2001
From: Jonathan Peppers
Date: Tue, 18 Aug 2026 21:17:14 -0500
Subject: [PATCH 2/9] Fix imported ICU documentation artifacts
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
---
.../DateIntervalFormat+FormattedDateInterval.xml | 6 +++---
docs/xml/Android.Icu.Text/DisplayContext.xml | 6 +++---
docs/xml/Android.Icu.Text/IReplaceable.xml | 4 ++--
.../Android.Icu.Text/ListFormatter+FormattedList.xml | 6 +++---
docs/xml/Android.Icu.Text/ListFormatter.xml | 2 +-
docs/xml/Android.Icu.Text/LocaleDisplayNames.xml | 4 ++--
...veDateTimeFormatter+FormattedRelativeDateTime.xml | 6 +++---
docs/xml/Android.Icu.Text/Transliterator.xml | 12 ++++++------
docs/xml/Android.Icu.Text/UnicodeSetSpanner.xml | 12 ++++++------
9 files changed, 29 insertions(+), 29 deletions(-)
diff --git a/docs/xml/Android.Icu.Text/DateIntervalFormat+FormattedDateInterval.xml b/docs/xml/Android.Icu.Text/DateIntervalFormat+FormattedDateInterval.xml
index 5925ca70e..519942a0d 100644
--- a/docs/xml/Android.Icu.Text/DateIntervalFormat+FormattedDateInterval.xml
+++ b/docs/xml/Android.Icu.Text/DateIntervalFormat+FormattedDateInterval.xml
@@ -294,9 +294,9 @@
Returns the length of this character sequence.
- the number of char s in this sequence
+ the number of chars in this sequence
- Returns the length of this character sequence. The length is the number of 16-bit char s in the sequence.
+ Returns the length of this character sequence. The length is the number of 16-bit chars in the sequence.
Java documentation for android.icu.text.DateIntervalFormat.FormattedDateInterval.length().
@@ -449,7 +449,7 @@
Returns a CharSequence that is a subsequence of this sequence.
the specified subsequence
- Returns a CharSequence that is a subsequence of this sequence. The subsequence starts with the char value at the specified index and ends with the char value at index end - 1. The length (in char s) of the returned sequence is end - start, so if start == end then an empty sequence is returned.
+ Returns a CharSequence that is a subsequence of this sequence. The subsequence starts with the char value at the specified index and ends with the char value at index end - 1. The length (in chars) of the returned sequence is end - start, so if start == end then an empty sequence is returned.
Java documentation for android.icu.text.DateIntervalFormat.FormattedDateInterval.subSequence(int, int).
diff --git a/docs/xml/Android.Icu.Text/DisplayContext.xml b/docs/xml/Android.Icu.Text/DisplayContext.xml
index b3cd38839..84cdaef13 100644
--- a/docs/xml/Android.Icu.Text/DisplayContext.xml
+++ b/docs/xml/Android.Icu.Text/DisplayContext.xml
@@ -258,10 +258,10 @@
- Get the Type part of the enum item (e.g.
- To be added.
+ Gets the Type part of the enum item (for example, CAPITALIZATION).
+ The Type part of this enum item.
- Get the Type part of the enum item (e.g. CAPITALIZATION)
+ Gets the Type part of the enum item (for example, CAPITALIZATION).
Android reference for android.icu.text.DisplayContext.type.
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
diff --git a/docs/xml/Android.Icu.Text/IReplaceable.xml b/docs/xml/Android.Icu.Text/IReplaceable.xml
index 234539c60..07c302b30 100644
--- a/docs/xml/Android.Icu.Text/IReplaceable.xml
+++ b/docs/xml/Android.Icu.Text/IReplaceable.xml
@@ -328,10 +328,10 @@
System.Boolean
- R Returns true if this object contains metadata.
+ Returns true if this object contains metadata.
true if this object contains metadata
- R Returns true if this object contains metadata. If a Replaceable object has metadata, calls to the Replaceable API must be made so as to preserve metadata. If it does not, calls to the Replaceable API may be optimized to improve performance.
+ Returns true if this object contains metadata. If a Replaceable object has metadata, calls to the Replaceable API must be made so as to preserve metadata. If it does not, calls to the Replaceable API may be optimized to improve performance.
Android reference for android.icu.text.Replaceable.hasMetaData.
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
diff --git a/docs/xml/Android.Icu.Text/ListFormatter+FormattedList.xml b/docs/xml/Android.Icu.Text/ListFormatter+FormattedList.xml
index 0cebad18f..5b338a7da 100644
--- a/docs/xml/Android.Icu.Text/ListFormatter+FormattedList.xml
+++ b/docs/xml/Android.Icu.Text/ListFormatter+FormattedList.xml
@@ -294,9 +294,9 @@
Returns the length of this character sequence.
- the number of char s in this sequence
+ the number of chars in this sequence
- Returns the length of this character sequence. The length is the number of 16-bit char s in the sequence.
+ Returns the length of this character sequence. The length is the number of 16-bit chars in the sequence.
Java documentation for android.icu.text.ListFormatter.FormattedList.length().
@@ -449,7 +449,7 @@
Returns a CharSequence that is a subsequence of this sequence.
the specified subsequence
- Returns a CharSequence that is a subsequence of this sequence. The subsequence starts with the char value at the specified index and ends with the char value at index end - 1. The length (in char s) of the returned sequence is end - start, so if start == end then an empty sequence is returned.
+ Returns a CharSequence that is a subsequence of this sequence. The subsequence starts with the char value at the specified index and ends with the char value at index end - 1. The length (in chars) of the returned sequence is end - start, so if start == end then an empty sequence is returned.
Java documentation for android.icu.text.ListFormatter.FormattedList.subSequence(int, int).
diff --git a/docs/xml/Android.Icu.Text/ListFormatter.xml b/docs/xml/Android.Icu.Text/ListFormatter.xml
index 3e8c40910..e8a978b96 100644
--- a/docs/xml/Android.Icu.Text/ListFormatter.xml
+++ b/docs/xml/Android.Icu.Text/ListFormatter.xml
@@ -233,7 +233,7 @@
items to format. The toString() method is called on each.
Format a collection of objects to a FormattedList.
items formatted into a FormattedList
- To be added.
+
Android reference for android.icu.text.ListFormatter.formatToValue.
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
diff --git a/docs/xml/Android.Icu.Text/LocaleDisplayNames.xml b/docs/xml/Android.Icu.Text/LocaleDisplayNames.xml
index 749540700..ffcf7ef67 100644
--- a/docs/xml/Android.Icu.Text/LocaleDisplayNames.xml
+++ b/docs/xml/Android.Icu.Text/LocaleDisplayNames.xml
@@ -276,7 +276,7 @@
the display locale
- one or more context settings (e.g. for dialect handling, capitalization, etc.
+ one or more context settings (e.g. for dialect handling, capitalization, etc.).
Returns an instance of LocaleDisplayNames that returns names formatted for the provided locale, using the provided DisplayContext settings
a LocaleDisplayNames instance
@@ -365,7 +365,7 @@
the display Locale
- one or more context settings (e.g. for dialect handling, capitalization, etc.
+ one or more context settings (e.g. for dialect handling, capitalization, etc.).
Returns an instance of LocaleDisplayNames that returns names formatted for the provided Locale, using the provided DisplayContext settings
a LocaleDisplayNames instance
diff --git a/docs/xml/Android.Icu.Text/RelativeDateTimeFormatter+FormattedRelativeDateTime.xml b/docs/xml/Android.Icu.Text/RelativeDateTimeFormatter+FormattedRelativeDateTime.xml
index 600bc1756..c4b0539b4 100644
--- a/docs/xml/Android.Icu.Text/RelativeDateTimeFormatter+FormattedRelativeDateTime.xml
+++ b/docs/xml/Android.Icu.Text/RelativeDateTimeFormatter+FormattedRelativeDateTime.xml
@@ -308,9 +308,9 @@
Returns the length of this character sequence.
- the number of char s in this sequence
+ the number of chars in this sequence
- Returns the length of this character sequence. The length is the number of 16-bit char s in the sequence.
+ Returns the length of this character sequence. The length is the number of 16-bit chars in the sequence.
Java documentation for android.icu.text.RelativeDateTimeFormatter.FormattedRelativeDateTime.length().
@@ -463,7 +463,7 @@
Returns a CharSequence that is a subsequence of this sequence.
the specified subsequence
- Returns a CharSequence that is a subsequence of this sequence. The subsequence starts with the char value at the specified index and ends with the char value at index end - 1. The length (in char s) of the returned sequence is end - start, so if start == end then an empty sequence is returned.
+ Returns a CharSequence that is a subsequence of this sequence. The subsequence starts with the char value at the specified index and ends with the char value at index end - 1. The length (in chars) of the returned sequence is end - start, so if start == end then an empty sequence is returned.
Java documentation for android.icu.text.RelativeDateTimeFormatter.FormattedRelativeDateTime.subSequence(int, int).
diff --git a/docs/xml/Android.Icu.Text/Transliterator.xml b/docs/xml/Android.Icu.Text/Transliterator.xml
index 954d677d3..bbc428bdc 100644
--- a/docs/xml/Android.Icu.Text/Transliterator.xml
+++ b/docs/xml/Android.Icu.Text/Transliterator.xml
@@ -560,7 +560,7 @@
the buffer holding transliterated and untransliterated text.
the array of indices previously passed to transliterate(Replaceable)
Finishes any pending transliterations that were waiting for more characters.
- To be added.
+
Android reference for android.icu.text.Transliterator.finishTransliteration.
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
@@ -1593,9 +1593,9 @@
the buffer holding transliterated and untransliterated text
the start and limit of the text, the position of the cursor, and the start and limit of transliteration.
- Transliterates the portion of the text buffer that can be transliterated unambiguosly.
+ Transliterates the portion of the text buffer that can be transliterated unambiguously.
- Transliterates the portion of the text buffer that can be transliterated unambiguosly. This is a convenience method; see transliterate(Replaceable,Transliterator.Position,String) for details.
+ Transliterates the portion of the text buffer that can be transliterated unambiguously. This is a convenience method; see transliterate(Replaceable,Transliterator.Position,String) for details.
Android reference for android.icu.text.Transliterator.transliterate.
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
@@ -1633,9 +1633,9 @@
the buffer holding transliterated and untransliterated text
the start and limit of the text, the position of the cursor, and the start and limit of transliteration.
text to be inserted and possibly transliterated into the translation buffer at index.contextLimit.
- Transliterates the portion of the text buffer that can be transliterated unambiguosly after a new character has been inserted, typically as a result of a keyboard event.
+ Transliterates the portion of the text buffer that can be transliterated unambiguously after a new character has been inserted, typically as a result of a keyboard event.
- Transliterates the portion of the text buffer that can be transliterated unambiguosly after a new character has been inserted, typically as a result of a keyboard event. This is a convenience method; see transliterate(Replaceable,Transliterator.Position,String) for details.
+ Transliterates the portion of the text buffer that can be transliterated unambiguously after a new character has been inserted, typically as a result of a keyboard event. This is a convenience method; see transliterate(Replaceable,Transliterator.Position,String) for details.
Android reference for android.icu.text.Transliterator.transliterate.
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
@@ -1673,7 +1673,7 @@
the buffer holding transliterated and untransliterated text
the start and limit of the text, the position of the cursor, and the start and limit of transliteration.
text to be inserted and possibly transliterated into the translation buffer at index.contextLimit. If null then no text is inserted.
- Transliterates the portion of the text buffer that can be transliterated unambiguosly after new text has been inserted, typically as a result of a keyboard event.
+ Transliterates the portion of the text buffer that can be transliterated unambiguously after new text has been inserted, typically as a result of a keyboard event.
To be added.
Android reference for android.icu.text.Transliterator.transliterate.
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
diff --git a/docs/xml/Android.Icu.Text/UnicodeSetSpanner.xml b/docs/xml/Android.Icu.Text/UnicodeSetSpanner.xml
index e978c639f..194f042ab 100644
--- a/docs/xml/Android.Icu.Text/UnicodeSetSpanner.xml
+++ b/docs/xml/Android.Icu.Text/UnicodeSetSpanner.xml
@@ -925,7 +925,7 @@
Returns a trimmed sequence (using CharSequence.
a subsequence
- Returns a trimmed sequence (using CharSequence.subsequence()), that omits matching elements at the start and
+ Returns a trimmed sequence (using CharSequence.subSequence()), that omits matching elements at the start and
end of the string, using TrimOption.BOTH and SpanCondition.SIMPLE. For example:
{@code
@@ -1044,7 +1044,7 @@
Returns a trimmed sequence (using CharSequence.
a subsequence
- Returns a trimmed sequence (using CharSequence.subsequence()), that omits matching elements at the start and
+ Returns a trimmed sequence (using CharSequence.subSequence()), that omits matching elements at the start and
end of the string, using TrimOption.BOTH and SpanCondition.SIMPLE. For example:
{@code
@@ -1094,10 +1094,10 @@
the sequence to trim
LEADING, TRAILING, or BOTH
- Returns a trimmed sequence (using CharSequence.subsequence()), that omits matching elements at the start or end of the string, using the trimOption and SpanCondition.SIMPLE.
+ Returns a trimmed sequence (using CharSequence.subSequence()), that omits matching elements at the start or end of the string, using the trimOption and SpanCondition.SIMPLE.
a subsequence
- Returns a trimmed sequence (using CharSequence.subsequence()), that omits matching elements at the start or end of the string, using the trimOption and SpanCondition.SIMPLE. For example:... returns "catbab".
+ Returns a trimmed sequence (using CharSequence.subSequence()), that omits matching elements at the start or end of the string, using the trimOption and SpanCondition.SIMPLE. For example:... returns "catbab".
Android reference for android.icu.text.UnicodeSetSpanner.trim.
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
@@ -1135,10 +1135,10 @@
the sequence to trim
LEADING, TRAILING, or BOTH
SIMPLE, CONTAINED or NOT_CONTAINED
- Returns a trimmed sequence (using CharSequence.subsequence()), that omits matching elements at the start or end of the string, depending on the trimOption and spanCondition.
+ Returns a trimmed sequence (using CharSequence.subSequence()), that omits matching elements at the start or end of the string, depending on the trimOption and spanCondition.
a subsequence
- Returns a trimmed sequence (using CharSequence.subsequence()), that omits matching elements at the start or end of the string, depending on the trimOption and spanCondition. For example:... returns "catbab".
+ Returns a trimmed sequence (using CharSequence.subSequence()), that omits matching elements at the start or end of the string, depending on the trimOption and spanCondition. For example:... returns "catbab".
Android reference for android.icu.text.UnicodeSetSpanner.trim.
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
From 8a20af9763e950cd20d171bff2bbbbb5020d04cb Mon Sep 17 00:00:00 2001
From: Jonathan Peppers
Date: Wed, 19 Aug 2026 07:50:17 -0500
Subject: [PATCH 3/9] Repair ICU importer documentation artifacts
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 090d0776-3020-428e-a4b0-e062232ad5ed
---
docs/xml/Android.Icu.Text/CaseMap+Title.xml | 2 +-
.../ConstrainedFieldPosition.xml | 4 +-
.../DateTimePatternGenerator.xml | 2 +-
.../DisplayOptions+Builder.xml | 2 +-
docs/xml/Android.Icu.Text/Edits.xml | 2 +-
.../RelativeDateTimeFormatter.xml | 12 +-
docs/xml/Android.Icu.Text/Transliterator.xml | 2 +-
.../UnicodeSet+SpanCondition.xml | 2 +-
tools/importer.cs | 174 ++++++++++++++++--
9 files changed, 171 insertions(+), 31 deletions(-)
diff --git a/docs/xml/Android.Icu.Text/CaseMap+Title.xml b/docs/xml/Android.Icu.Text/CaseMap+Title.xml
index 31f3f983d..68716d586 100644
--- a/docs/xml/Android.Icu.Text/CaseMap+Title.xml
+++ b/docs/xml/Android.Icu.Text/CaseMap+Title.xml
@@ -422,7 +422,7 @@
Returns an instance that behaves like this one but does not lowercase non-initial parts of words when titlecasing.
an options object with this option.
- To be added.
+
Android reference for android.icu.text.CaseMap.Title.noLowercase.
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
diff --git a/docs/xml/Android.Icu.Text/ConstrainedFieldPosition.xml b/docs/xml/Android.Icu.Text/ConstrainedFieldPosition.xml
index 63cea947b..ef7bf8fc4 100644
--- a/docs/xml/Android.Icu.Text/ConstrainedFieldPosition.xml
+++ b/docs/xml/Android.Icu.Text/ConstrainedFieldPosition.xml
@@ -228,7 +228,7 @@
Gets the field for the current position.
The field saved in the instance. See above for null conditions.
- To be added.
+
Android reference for android.icu.text.ConstrainedFieldPosition.getField.
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
@@ -533,7 +533,7 @@
The new inclusive start index.
The new exclusive end index.
Sets new values for the primary public getters.
- To be added.
+
Android reference for android.icu.text.ConstrainedFieldPosition.setState.
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
diff --git a/docs/xml/Android.Icu.Text/DateTimePatternGenerator.xml b/docs/xml/Android.Icu.Text/DateTimePatternGenerator.xml
index e22228477..44c7d8780 100644
--- a/docs/xml/Android.Icu.Text/DateTimePatternGenerator.xml
+++ b/docs/xml/Android.Icu.Text/DateTimePatternGenerator.xml
@@ -1171,7 +1171,7 @@
The desired DisplayWidth, such as DisplayWidth.ABBREVIATED.
The general interface to get a display name for a particular date/time field, in one of several possible display widths.
The display name for the field
- To be added.
+
Android reference for android.icu.text.DateTimePatternGenerator.getFieldDisplayName.
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
diff --git a/docs/xml/Android.Icu.Text/DisplayOptions+Builder.xml b/docs/xml/Android.Icu.Text/DisplayOptions+Builder.xml
index 27deadbcf..c66fc5e21 100644
--- a/docs/xml/Android.Icu.Text/DisplayOptions+Builder.xml
+++ b/docs/xml/Android.Icu.Text/DisplayOptions+Builder.xml
@@ -357,7 +357,7 @@
The plural category.
Sets the plural category.
To be added.
- To be added.
+
Android reference for android.icu.text.DisplayOptions.Builder.setPluralCategory.
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
diff --git a/docs/xml/Android.Icu.Text/Edits.xml b/docs/xml/Android.Icu.Text/Edits.xml
index ce58a9747..0649a69ab 100644
--- a/docs/xml/Android.Icu.Text/Edits.xml
+++ b/docs/xml/Android.Icu.Text/Edits.xml
@@ -307,7 +307,7 @@
Returns an Iterator for fine-grained change edits (full granularity of change edits is retained).
an Iterator that separates adjacent changes.
- To be added.
+
Android reference for android.icu.text.Edits.getFineChangesIterator.
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
diff --git a/docs/xml/Android.Icu.Text/RelativeDateTimeFormatter.xml b/docs/xml/Android.Icu.Text/RelativeDateTimeFormatter.xml
index 1ba7433d1..e65a587dd 100644
--- a/docs/xml/Android.Icu.Text/RelativeDateTimeFormatter.xml
+++ b/docs/xml/Android.Icu.Text/RelativeDateTimeFormatter.xml
@@ -245,7 +245,7 @@
The signed offset for the specified field.
The unit to use when formatting the relative date, e.g. RelativeDateTimeUnit.WEEK, RelativeDateTimeUnit.FRIDAY.
- Format a combination of RelativeDateTimeUnit and numeric offset using a text style if possible, e.g.
+ Format a combination of RelativeDateTimeUnit and numeric offset using a text style if possible, e.g. "last week", "this week", "next week", "yesterday", "tomorrow".
The formatted string (may be empty in case of error)
Format a combination of RelativeDateTimeUnit and numeric offset using a text style if possible, e.g. "last week", "this week", "next week", "yesterday", "tomorrow". Falls back to numeric style if no appropriate text term is available for the specified offset in the object’s locale. This method returns a String. To get more information about the formatting result, use formatToValue().
@@ -325,7 +325,7 @@
The signed offset for the specified unit. This will be formatted according to this object's NumberFormat object.
The unit to use when formatting the relative date, e.g. RelativeDateTimeUnit.WEEK, RelativeDateTimeUnit.FRIDAY.
- Format a combination of RelativeDateTimeUnit and numeric offset using a numeric style, e.g.
+ Format a combination of RelativeDateTimeUnit and numeric offset using a numeric style, e.g. "1 week ago", "in 1 week", "5 weeks ago", "in 5 weeks".
The formatted string (may be empty in case of error)
Format a combination of RelativeDateTimeUnit and numeric offset using a numeric style, e.g. "1 week ago", "in 1 week", "5 weeks ago", "in 5 weeks". This method returns a String. To get more information about the formatting result, use formatNumericToValue().
@@ -364,9 +364,9 @@
The signed offset for the specified unit. This will be formatted according to this object's NumberFormat object.
The unit to use when formatting the relative date, e.g. RelativeDateTimeUnit.WEEK, RelativeDateTimeUnit.FRIDAY.
- Format a combination of RelativeDateTimeUnit and numeric offset using a numeric style, e.g.
+ Format a combination of RelativeDateTimeUnit and numeric offset using a numeric style, e.g. "1 week ago", "in 1 week", "5 weeks ago", "in 5 weeks".
The formatted string (may be empty in case of error)
- To be added.
+
Android reference for android.icu.text.RelativeDateTimeFormatter.formatNumericToValue.
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
@@ -474,9 +474,9 @@
The signed offset for the specified field.
The unit to use when formatting the relative date, e.g. RelativeDateTimeUnit.WEEK, RelativeDateTimeUnit.FRIDAY.
- Format a combination of RelativeDateTimeUnit and numeric offset using a text style if possible, e.g.
+ Format a combination of RelativeDateTimeUnit and numeric offset using a text style if possible, e.g. "last week", "this week", "next week", "yesterday", "tomorrow".
The formatted string (may be empty in case of error)
- To be added.
+
Android reference for android.icu.text.RelativeDateTimeFormatter.formatToValue.
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
diff --git a/docs/xml/Android.Icu.Text/Transliterator.xml b/docs/xml/Android.Icu.Text/Transliterator.xml
index bbc428bdc..06b53c7f9 100644
--- a/docs/xml/Android.Icu.Text/Transliterator.xml
+++ b/docs/xml/Android.Icu.Text/Transliterator.xml
@@ -1674,7 +1674,7 @@
the start and limit of the text, the position of the cursor, and the start and limit of transliteration.
text to be inserted and possibly transliterated into the translation buffer at index.contextLimit. If null then no text is inserted.
Transliterates the portion of the text buffer that can be transliterated unambiguously after new text has been inserted, typically as a result of a keyboard event.
- To be added.
+
Android reference for android.icu.text.Transliterator.transliterate.
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
diff --git a/docs/xml/Android.Icu.Text/UnicodeSet+SpanCondition.xml b/docs/xml/Android.Icu.Text/UnicodeSet+SpanCondition.xml
index f542a381b..e0743ffc8 100644
--- a/docs/xml/Android.Icu.Text/UnicodeSet+SpanCondition.xml
+++ b/docs/xml/Android.Icu.Text/UnicodeSet+SpanCondition.xml
@@ -26,7 +26,7 @@
- Argument values for whether span() and similar functions continue while the current character is contained vs.
+ Argument values for whether span() and similar functions continue while the current character is contained vs. not contained in the set.
Argument values for whether span() and similar functions continue while the current character is contained vs.
not contained in the set.
diff --git a/tools/importer.cs b/tools/importer.cs
index bb70130cf..6e869996c 100644
--- a/tools/importer.cs
+++ b/tools/importer.cs
@@ -87,11 +87,13 @@ public static async Task RunAsync(string[] args)
}
var sourceRequests = loadedFiles
- .SelectMany(file => file.Owners)
- .Where(owner =>
- owner.Placeholders.Count > 0 ||
- IsEnumSummaryRepairCandidate(owner))
- .Select(owner => owner.SourceRequest)
+ .SelectMany(file => file.Owners.Select(owner => (File: file, Owner: owner)))
+ .Where(item =>
+ item.Owner.Placeholders.Count > 0 ||
+ IsEnumSummaryRepairCandidate(item.Owner) ||
+ HasAugmentedRemarksPlaceholder(item.File, item.Owner) ||
+ HasTruncatedImporterSummary(item.File, item.Owner))
+ .Select(item => item.Owner.SourceRequest)
.Where(request => request is not null)
.Cast()
.DistinctBy(request => request.Url, StringComparer.Ordinal)
@@ -208,24 +210,36 @@ public static async Task RunAsync(string[] args)
mapping.SourceUrl));
}
+ var enumSummaryRepair = IsEnumSummaryRepairCandidate(owner);
+ var augmentedRemarksRepair = HasAugmentedRemarksPlaceholder(file, owner);
+ var truncatedSummaryRepair = HasTruncatedImporterSummary(file, owner);
if (!ownerChanged &&
mapping.Docs is not null &&
- IsEnumSummaryRepairCandidate(owner))
+ (enumSummaryRepair || augmentedRemarksRepair || truncatedSummaryRepair))
{
- var refreshed = AddSourceDocumentationIfSafe(
- text,
- file,
- owner,
- mapping.Docs,
- allowEnumCreation: false);
+ var refreshed = truncatedSummaryRepair
+ ? ReplaceTruncatedSummary(text, file, owner, mapping.Docs)
+ : text;
+ if (enumSummaryRepair || augmentedRemarksRepair)
+ {
+ refreshed = AddSourceDocumentationIfSafe(
+ refreshed,
+ file,
+ owner,
+ mapping.Docs,
+ allowEnumCreation: false);
+ }
if (!refreshed.Equals(text, StringComparison.Ordinal))
{
+ var repairTarget = enumSummaryRepair || truncatedSummaryRepair
+ ? "summary"
+ : "remarks";
if (remaining == 0)
{
report.Entries.Add(ReportEntry.Skipped(
file.RelativePath,
owner.Id,
- "summary",
+ repairTarget,
"max_changes_reached",
$"The --max-changes limit of {options.MaxChanges} was reached.",
mapping.SourceUrl));
@@ -241,7 +255,7 @@ mapping.Docs is not null &&
"would_apply",
file.RelativePath,
owner.Id,
- "summary",
+ repairTarget,
mapping.SourceUrl));
}
}
@@ -794,6 +808,7 @@ static string AddSourceDocumentationIfSafe(
}
blockText = RemoveStaleSourceLinks(blockText, docs.SourceUrl, removeAll: false);
+ blockText = RemoveAugmentedRemarksPlaceholder(blockText);
if (ContainsSourceUrl(blockText, docs.SourceUrl))
return text[..block.Start] + blockText + text[block.End..];
@@ -879,6 +894,66 @@ static string AddSourceDocumentationIfSafe(
return text[..block.Start] + replacementBlock + text[block.End..];
}
+ static bool HasAugmentedRemarksPlaceholder(LoadedFile file, DocsOwner owner)
+ {
+ var block = file.DocsBlocks[owner.Order];
+ return Regex.IsMatch(
+ file.Text[block.Start..block.End],
+ @"]*>[ \t]*To be added\.?[ \t]*(?:\r?\n[ \t]*)?
+ Regex.Replace(
+ blockText,
+ @"(?]*>)[ \t]*To be added\.?[ \t]*(?:(?\r?\n)(?[ \t]*))?(?= match.Groups["open"].Value +
+ (match.Groups["linebreak"].Success
+ ? match.Groups["linebreak"].Value + match.Groups["indent"].Value
+ : ""),
+ RegexOptions.CultureInvariant);
+
+ static string ReplaceTruncatedSummary(
+ string text,
+ LoadedFile file,
+ DocsOwner owner,
+ SourceDocs docs)
+ {
+ var block = file.DocsBlocks[owner.Order];
+ var blockText = text[block.Start..block.End];
+ var summary = Regex.Match(
+ blockText,
+ @"]*>(?[^<]*)",
+ RegexOptions.CultureInvariant);
+ if (!summary.Success ||
+ (!summary.Groups["value"].Value.TrimEnd().EndsWith("e.g.", StringComparison.OrdinalIgnoreCase) &&
+ !summary.Groups["value"].Value.TrimEnd().EndsWith("vs.", StringComparison.OrdinalIgnoreCase)))
+ {
+ return text;
+ }
+
+ var valueStart = summary.Groups["value"].Index;
+ var valueEnd = valueStart + summary.Groups["value"].Length;
+ var updatedBlock = blockText[..valueStart] + XmlEscape(docs.Summary) + blockText[valueEnd..];
+ return text[..block.Start] + updatedBlock + text[block.End..];
+ }
+
static string RemoveStaleSourceLinks(
string blockText,
string sourceUrl,
@@ -1237,6 +1312,16 @@ static int RunSelfTest(string repositoryRoot)
var request = file.Owners[0].SourceRequest!;
var androidPage = SourcePage.Parse(request, androidHtml);
Assert(androidPage.TypeDocs?.Summary == "Represents a fixture widget.", "Android type summary");
+ var abbreviationPage = SourcePage.Parse(
+ request,
+ androidHtml.Replace(
+ "Represents a fixture widget. The widget is used only by local importer tests.",
+ "Distinguishes contained vs. not contained, e.g. in fixture input. The widget is used only by local importer tests.",
+ StringComparison.Ordinal));
+ Assert(
+ abbreviationPage.TypeDocs?.Summary ==
+ "Distinguishes contained vs. not contained, e.g. in fixture input.",
+ "abbreviations do not truncate summaries");
var setTitle = file.Owners.Single(owner => owner.Id.Contains("SetTitle", StringComparison.Ordinal));
var pages = new Dictionary(StringComparer.Ordinal)
@@ -1246,6 +1331,34 @@ static int RunSelfTest(string repositoryRoot)
var mapped = MapOwner(setTitle, pages);
var mappedDocs = mapped.Docs ?? throw new InvalidOperationException(
"SELF-TEST FAIL: exact Android JNI match");
+ var augmentedRemarksText = file.Text.Replace(
+ "\n Keep this existing prose.",
+ "\n To be added.\n Keep this existing prose.",
+ StringComparison.Ordinal);
+ var cleanedRemarksText = AddSourceDocumentationIfSafe(
+ augmentedRemarksText,
+ file,
+ setTitle,
+ mappedDocs);
+ Assert(
+ !cleanedRemarksText.Contains(
+ "\n To be added.\n Keep this existing prose.",
+ StringComparison.Ordinal),
+ "augmented remarks placeholder is removed");
+ var truncatedSummaryText = file.Text.Replace(
+ "To be added.",
+ "Distinguishes fixtures vs.",
+ StringComparison.Ordinal);
+ var repairedSummaryText = ReplaceTruncatedSummary(
+ truncatedSummaryText,
+ file,
+ setTitle,
+ mappedDocs);
+ Assert(
+ repairedSummaryText.Contains(
+ "Sets the widget title.",
+ StringComparison.Ordinal),
+ "truncated importer summary is replaced from source");
var titleParameter = setTitle.Placeholders.Single(item => item.Name == "param");
Assert(
ReplacementFor(titleParameter, mappedDocs).Text == "the title to display",
@@ -1680,7 +1793,7 @@ static int RunSelfTest(string repositoryRoot)
Directory.Delete(tempDirectory, true);
}
- Console.WriteLine("SELF-TEST PASS: 52 assertions; path-only repository-wide non-API XML exclusion, exact Android/Java method and field matching, exact Android table headings, deprecated Java block exclusion, exact-structure deprecated enum repair and failure reporting, self-closing remarks expansion, table alignment, quote-aware HTML cleanup, stale-link replacement, partial-write reporting, mismatch and low-value channel skipping, source cleanup, channel extraction, preservation, paragraph remarks, source-link ordering, CRLF atomic writes, and XML parsing.");
+ Console.WriteLine("SELF-TEST PASS: 55 assertions; path-only repository-wide non-API XML exclusion, exact Android/Java method and field matching, abbreviation-aware summaries, augmented-placeholder cleanup, truncated-summary repair, exact Android table headings, deprecated Java block exclusion, exact-structure deprecated enum repair and failure reporting, self-closing remarks expansion, table alignment, quote-aware HTML cleanup, stale-link replacement, partial-write reporting, mismatch and low-value channel skipping, source cleanup, channel extraction, preservation, paragraph remarks, source-link ordering, CRLF atomic writes, and XML parsing.");
return 0;
}
@@ -2684,8 +2797,35 @@ static string StripHtmlTags(string html)
static string FirstSentence(string text)
{
- var match = Regex.Match(text, @"^(.+?[.!?])(?:\s|$)", RegexOptions.CultureInvariant);
- return match.Success ? match.Groups[1].Value : text;
+ for (var index = 0; index < text.Length; index++)
+ {
+ if (text[index] is not ('.' or '!' or '?') ||
+ (index + 1 < text.Length && !char.IsWhiteSpace(text[index + 1])) ||
+ (text[index] == '.' && IsAbbreviation(text, index)))
+ {
+ continue;
+ }
+
+ return text[..(index + 1)];
+ }
+
+ return text;
+ }
+
+ static bool IsAbbreviation(string text, int periodIndex)
+ {
+ var tokenStart = periodIndex;
+ while (tokenStart > 0 && !char.IsWhiteSpace(text[tokenStart - 1]))
+ tokenStart--;
+ var token = text[tokenStart..(periodIndex + 1)];
+ return token.Equals("e.g.", StringComparison.OrdinalIgnoreCase) ||
+ token.Equals("i.e.", StringComparison.OrdinalIgnoreCase) ||
+ token.Equals("vs.", StringComparison.OrdinalIgnoreCase) ||
+ token.Equals("etc.", StringComparison.OrdinalIgnoreCase) ||
+ Regex.IsMatch(
+ token,
+ @"^(?:[A-Za-z]\.){2,}$",
+ RegexOptions.CultureInvariant);
}
}
From 2545a56f124b493396accaa7845fb8a1c7be15f7 Mon Sep 17 00:00:00 2001
From: Jonathan Peppers
Date: Wed, 19 Aug 2026 09:01:34 -0500
Subject: [PATCH 4/9] Fix importer remarks cleanup self-test
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 090d0776-3020-428e-a4b0-e062232ad5ed
---
tools/importer.cs | 24 +++++++++++++-----------
1 file changed, 13 insertions(+), 11 deletions(-)
diff --git a/tools/importer.cs b/tools/importer.cs
index 1322bd237..52325b346 100644
--- a/tools/importer.cs
+++ b/tools/importer.cs
@@ -936,7 +936,7 @@ static bool HasAugmentedRemarksPlaceholder(LoadedFile file, DocsOwner owner)
var block = file.DocsBlocks[owner.Order];
return Regex.IsMatch(
file.Text[block.Start..block.End],
- @"]*>[ \t]*To be added\.?[ \t]*(?:\r?\n[ \t]*)?]*>[ \t\r\n]*To be added\.?[ \t\r\n]*(?=
Regex.Replace(
blockText,
- @"(?]*>)[ \t]*To be added\.?[ \t]*(?:(?\r?\n)(?[ \t]*))?(?= match.Groups["open"].Value +
- (match.Groups["linebreak"].Success
- ? match.Groups["linebreak"].Value + match.Groups["indent"].Value
- : ""),
+ @"(?]*>)[ \t\r\n]*To be added\.?(?[ \t\r\n]*)(?= match.Groups["open"].Value + match.Groups["separator"].Value,
RegexOptions.CultureInvariant);
static string ReplaceTruncatedSummary(
@@ -1368,20 +1365,25 @@ static int RunSelfTest(string repositoryRoot)
var mapped = MapOwner(setTitle, pages);
var mappedDocs = mapped.Docs ?? throw new InvalidOperationException(
"SELF-TEST FAIL: exact Android JNI match");
+ var originalRemarks = $"{file.Newline} Keep this existing prose.";
+ var augmentedRemarks = $"{file.Newline} To be added.{file.Newline} Keep this existing prose.";
var augmentedRemarksText = file.Text.Replace(
- "\n Keep this existing prose.",
- "\n To be added.\n Keep this existing prose.",
+ originalRemarks,
+ augmentedRemarks,
StringComparison.Ordinal);
+ Assert(
+ !augmentedRemarksText.Equals(file.Text, StringComparison.Ordinal),
+ "augmented remarks fixture setup");
+ file.UpdateBlockOffsets(setTitle.Order, augmentedRemarksText);
var cleanedRemarksText = AddSourceDocumentationIfSafe(
augmentedRemarksText,
file,
setTitle,
mappedDocs);
Assert(
- !cleanedRemarksText.Contains(
- "\n To be added.\n Keep this existing prose.",
- StringComparison.Ordinal),
+ !cleanedRemarksText.Contains(augmentedRemarks, StringComparison.Ordinal),
"augmented remarks placeholder is removed");
+ file.UpdateBlockOffsets(setTitle.Order, file.Text);
var truncatedSummaryText = file.Text.Replace(
"To be added.",
"Distinguishes fixtures vs.",
From f244c522bbfe061d8f5bfe52e3cb8fa0aca1d182 Mon Sep 17 00:00:00 2001
From: Jonathan Peppers
Date: Wed, 19 Aug 2026 12:30:19 -0500
Subject: [PATCH 5/9] Reject standalone ICU source annotations
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 090d0776-3020-428e-a4b0-e062232ad5ed
---
docs/xml/Android.Icu.Text/BreakKind.xml | 25 ++++-----------------
docs/xml/Android.Icu.Text/MessageFormat.xml | 4 +---
tools/importer.cs | 11 ++++++++-
3 files changed, 15 insertions(+), 25 deletions(-)
diff --git a/docs/xml/Android.Icu.Text/BreakKind.xml b/docs/xml/Android.Icu.Text/BreakKind.xml
index be7c27627..8defdebb6 100644
--- a/docs/xml/Android.Icu.Text/BreakKind.xml
+++ b/docs/xml/Android.Icu.Text/BreakKind.xml
@@ -42,11 +42,7 @@
0
-
- [icu]
- Android reference for android.icu.text.BreakIterator.KIND_CHARACTER.
- Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
-
+ To be added.
@@ -76,11 +72,7 @@
2
-
- [icu]
- Android reference for android.icu.text.BreakIterator.KIND_LINE.
- Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
-
+ To be added.
@@ -110,11 +102,7 @@
3
-
- [icu]
- Android reference for android.icu.text.BreakIterator.KIND_SENTENCE.
- Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
-
+ To be added.
@@ -146,7 +134,6 @@
This constant was deprecated in API level 29. ICU 64 Use getWordInstance() instead.
- [icu]
Android reference for android.icu.text.BreakIterator.KIND_TITLE.
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
@@ -179,11 +166,7 @@
1
-
- [icu]
- Android reference for android.icu.text.BreakIterator.KIND_WORD.
- Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
-
+ To be added.
diff --git a/docs/xml/Android.Icu.Text/MessageFormat.xml b/docs/xml/Android.Icu.Text/MessageFormat.xml
index 420d62a23..ee93a3d74 100644
--- a/docs/xml/Android.Icu.Text/MessageFormat.xml
+++ b/docs/xml/Android.Icu.Text/MessageFormat.xml
@@ -433,11 +433,9 @@
Android.Icu.Text.MessagePattern+ApostropheMode
- [icu]
+ To be added.
this instance's ApostropheMode.
- [icu]
- Android reference for android.icu.text.MessageFormat.getApostropheMode.
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
diff --git a/tools/importer.cs b/tools/importer.cs
index 52325b346..ccddceb3a 100644
--- a/tools/importer.cs
+++ b/tools/importer.cs
@@ -692,6 +692,11 @@ static bool IsMeaningfulChannel(string value, string channel)
@"^Constant Value:\s*\S+(?:\s+\(\S+\))?$",
RegexOptions.IgnoreCase | RegexOptions.CultureInvariant))
return false;
+ if (Regex.IsMatch(
+ normalized,
+ @"^\[[A-Za-z][A-Za-z0-9_-]*\]$",
+ RegexOptions.CultureInvariant))
+ return false;
if (channel is "returns" or "value" or "param")
{
if (Regex.IsMatch(
@@ -1428,6 +1433,10 @@ static int RunSelfTest(string repositoryRoot)
},
});
Assert(simpleTypeOnly.Reason == "source_channel_not_meaningful", "simple type-only parameter skip");
+ var annotationOnly = ChannelValueOrSkip("[icu]", "summary", "source_summary_missing");
+ Assert(
+ annotationOnly.Reason == "source_channel_not_meaningful",
+ "standalone source annotation skip");
Assert(
CleanSourceText(@"the user\u2019s \u201cvalue\u201d") == "the user\u2019s \u201cvalue\u201d",
"literal Unicode escape decoding");
@@ -1876,7 +1885,7 @@ static int RunSelfTest(string repositoryRoot)
Directory.Delete(tempDirectory, true);
}
- Console.WriteLine("SELF-TEST PASS: 55 assertions; path-only repository-wide non-API XML exclusion, exact Android/Java method and field matching, abbreviation-aware summaries, augmented-placeholder cleanup, truncated-summary repair, importer metadata remarks repair, exact Android table headings, deprecated Java block exclusion, exact-structure deprecated enum repair and failure reporting, self-closing remarks expansion, table alignment, quote-aware HTML cleanup, stale-link replacement, partial-write reporting, mismatch and low-value channel skipping, source cleanup, channel extraction, preservation, paragraph remarks, source-link ordering, CRLF atomic writes, and XML parsing.");
+ Console.WriteLine("SELF-TEST PASS: 56 assertions; path-only repository-wide non-API XML exclusion, exact Android/Java method and field matching, abbreviation-aware summaries, augmented-placeholder cleanup, truncated-summary repair, importer metadata remarks repair, standalone annotation skipping, exact Android table headings, deprecated Java block exclusion, exact-structure deprecated enum repair and failure reporting, self-closing remarks expansion, table alignment, quote-aware HTML cleanup, stale-link replacement, partial-write reporting, mismatch and low-value channel skipping, source cleanup, channel extraction, preservation, paragraph remarks, source-link ordering, CRLF atomic writes, and XML parsing.");
return 0;
}
From c4e407c2706a5d774758e64068a5362da4a96676 Mon Sep 17 00:00:00 2001
From: Jonathan Peppers
Date: Wed, 19 Aug 2026 15:54:31 -0500
Subject: [PATCH 6/9] Preserve importer code example prose
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 090d0776-3020-428e-a4b0-e062232ad5ed
---
.../DateTimePatternGenerator.xml | 4 +-
.../Android.Icu.Text/DecimalFormatSymbols.xml | 14 +-
tools/importer.cs | 178 +++++++++++++++---
3 files changed, 155 insertions(+), 41 deletions(-)
diff --git a/docs/xml/Android.Icu.Text/DateTimePatternGenerator.xml b/docs/xml/Android.Icu.Text/DateTimePatternGenerator.xml
index 44c7d8780..1e11a9619 100644
--- a/docs/xml/Android.Icu.Text/DateTimePatternGenerator.xml
+++ b/docs/xml/Android.Icu.Text/DateTimePatternGenerator.xml
@@ -165,9 +165,9 @@
Adds a pattern to the generator.
To be added.
- Adds a pattern to the generator. If the pattern has the same skeleton as an existing pattern, and the override parameter is set, then the previous value is overridden. Otherwise, the previous value is retained. In either case, the conflicting information is returned in PatternInfo. Note that single-field patterns (like "MMM") are automatically added, and don't need to be added explicitly! Example code:
+ Adds a pattern to the generator. If the pattern has the same skeleton as an existing pattern, and the override parameter is set, then the previous value is overridden. Otherwise, the previous value is retained. In either case, the conflicting information is returned in PatternInfo. Note that single-field patterns (like "MMM") are automatically added, and don't need to be added explicitly! Example code: Date date= new GregorianCalendar(1999,9,13,23,58,59).getTime(); ULocale locale = ULocale.FRANCE; // Create an DateTimePatternGenerator instance for the given locale DateTimePatternGenerator gen = DateTimePatternGenerator.getInstance(locale); SimpleDateFormat format = new SimpleDateFormat(gen.getBestPattern("MMMMddHmm"), locale); DateTimePatternGenerator.PatternInfo returnInfo = new DateTimePatternGenerator.PatternInfo(); // Add '. von' to the existing pattern gen.addPattern("dd'. von' MMMM", true, returnInfo); // Apply the new pattern format.applyPattern(gen.getBestPattern("MMMMddHmm")); System.out.println("New Pattern for FRENCH: "+format.toPattern()); System.out.println("Date Time in new Pattern: "+format.format(date)); /** output of the sample code: ************************************************************************************************** New Pattern for FRENCH: dd. 'von' MMMM HH:mm Date Time in new Pattern: 13. von octobre 23:58 ************************************************************************************************* /
Android reference for android.icu.text.DateTimePatternGenerator.addPattern.
- Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
+ Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
diff --git a/docs/xml/Android.Icu.Text/DecimalFormatSymbols.xml b/docs/xml/Android.Icu.Text/DecimalFormatSymbols.xml
index de0fdfd64..97e7cbf29 100644
--- a/docs/xml/Android.Icu.Text/DecimalFormatSymbols.xml
+++ b/docs/xml/Android.Icu.Text/DecimalFormatSymbols.xml
@@ -239,17 +239,9 @@
Creates and returns a copy of this object.
a clone of this instance.
- Creates and returns a copy of this object. The precise meaning of "copy" may depend on the class of the object. The general intent is that, for any object x, the expression: will be true, and that the expression: will be true, but these are not absolute requirements. While it is typically the case that: will be true, this is not an absolute requirement. By convention, the returned object should be obtained by calling super.clone. If a class and all of its superclasses (except Object ) obey this convention, it will be the case that x.clone().getClass() == x.getClass(). By convention, the object returned by this method should be independent of this object (which is being cloned). To achieve this independence, it may be necessary to modify one or more fields of the object returned by super.clone before returning it. Typically, this means copying any mutable objects that comprise the internal "deep structure" of the object being cloned and replacing the references to these objects with references to the copies. If a class contains only primitive fields or references to immutable objects, then it is usually the case that no fields in the object returned by super.clone need to be modified.
-
-
- Java documentation for android.icu.text.DecimalFormatSymbols.clone().
-
-
-
- Portions of this page are modifications based on work created and shared by the
- Android Open Source Project
- and used according to terms described in the
- Creative Commons 2.5 Attribution License.
+ Creates and returns a copy of this object. The precise meaning of "copy" may depend on the class of the object. The general intent is that, for any object x, the expression: x.clone() != x will be true, and that the expression: x.clone().getClass() == x.getClass() will be true, but these are not absolute requirements. While it is typically the case that: x.clone().equals(x) will be true, this is not an absolute requirement. By convention, the returned object should be obtained by calling super.clone. If a class and all of its superclasses (except Object ) obey this convention, it will be the case that x.clone().getClass() == x.getClass(). By convention, the object returned by this method should be independent of this object (which is being cloned). To achieve this independence, it may be necessary to modify one or more fields of the object returned by super.clone before returning it. Typically, this means copying any mutable objects that comprise the internal "deep structure" of the object being cloned and replacing the references to these objects with references to the copies. If a class contains only primitive fields or references to immutable objects, then it is usually the case that no fields in the object returned by super.clone need to be modified.
+ Android reference for android.icu.text.DecimalFormatSymbols.clone.
+ Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
diff --git a/tools/importer.cs b/tools/importer.cs
index ccddceb3a..8697f6310 100644
--- a/tools/importer.cs
+++ b/tools/importer.cs
@@ -92,7 +92,8 @@ public static async Task RunAsync(string[] args)
item.Owner.Placeholders.Count > 0 ||
IsEnumSummaryRepairCandidate(item.Owner) ||
HasAugmentedRemarksPlaceholder(item.File, item.Owner) ||
- HasTruncatedImporterSummary(item.File, item.Owner))
+ HasTruncatedImporterSummary(item.File, item.Owner) ||
+ HasIncompleteCodeExampleRemarks(item.File, item.Owner))
.Select(item => item.Owner.SourceRequest)
.Where(request => request is not null)
.Cast()
@@ -213,13 +214,16 @@ public static async Task RunAsync(string[] args)
var enumSummaryRepair = IsEnumSummaryRepairCandidate(owner);
var augmentedRemarksRepair = HasAugmentedRemarksPlaceholder(file, owner);
var truncatedSummaryRepair = HasTruncatedImporterSummary(file, owner);
+ var codeExampleRepair = HasIncompleteCodeExampleRemarks(file, owner);
if (!ownerChanged &&
mapping.Docs is not null &&
- (enumSummaryRepair || augmentedRemarksRepair || truncatedSummaryRepair))
+ (enumSummaryRepair || augmentedRemarksRepair || truncatedSummaryRepair || codeExampleRepair))
{
var refreshed = truncatedSummaryRepair
? ReplaceTruncatedSummary(text, file, owner, mapping.Docs)
: text;
+ if (codeExampleRepair)
+ refreshed = ReplaceIncompleteCodeExampleRemarks(refreshed, file, owner, mapping.Docs);
if (enumSummaryRepair || augmentedRemarksRepair)
{
refreshed = AddSourceDocumentationIfSafe(
@@ -519,23 +523,20 @@ static bool ReportMappingFailure(
if (mapping.ErrorReason is null)
return false;
- foreach (var placeholder in owner.Placeholders)
- {
- report.Entries.Add(ReportEntry.Skipped(
- file.RelativePath,
- owner.Id,
- placeholder.Target,
- mapping.ErrorReason,
- mapping.Detail,
- mapping.SourceUrl));
- }
- if (IsEnumSummaryRepairCandidate(owner) &&
- !owner.Placeholders.Any(placeholder => placeholder.Name == "summary"))
+ var targets = owner.Placeholders
+ .Select(placeholder => placeholder.Target)
+ .ToHashSet(StringComparer.Ordinal);
+ if (IsEnumSummaryRepairCandidate(owner) || HasTruncatedImporterSummary(file, owner))
+ targets.Add("summary");
+ if (HasAugmentedRemarksPlaceholder(file, owner) || HasIncompleteCodeExampleRemarks(file, owner))
+ targets.Add("remarks");
+
+ foreach (var target in targets.OrderBy(target => target, StringComparer.Ordinal))
{
report.Entries.Add(ReportEntry.Skipped(
file.RelativePath,
owner.Id,
- "summary",
+ target,
mapping.ErrorReason,
mapping.Detail,
mapping.SourceUrl));
@@ -961,6 +962,52 @@ static bool HasTruncatedImporterSummary(LoadedFile file, DocsOwner owner)
StringComparison.Ordinal);
}
+ static bool HasIncompleteCodeExampleRemarks(LoadedFile file, DocsOwner owner)
+ {
+ var block = file.DocsBlocks[owner.Order];
+ var blockText = file.Text[block.Start..block.End];
+ return blockText.Contains("title=\"Reference documentation\"", StringComparison.Ordinal) &&
+ (blockText.Contains("Example code:", StringComparison.Ordinal) ||
+ blockText.Contains("expression: will be true", StringComparison.Ordinal));
+ }
+
+ static string ReplaceIncompleteCodeExampleRemarks(
+ string text,
+ LoadedFile file,
+ DocsOwner owner,
+ SourceDocs docs)
+ {
+ var block = file.DocsBlocks[owner.Order];
+ var blockText = text[block.Start..block.End];
+ var remarks = Regex.Match(
+ blockText,
+ @"[^>]*)>.*?",
+ RegexOptions.Singleline | RegexOptions.CultureInvariant);
+ if (!remarks.Success)
+ return text;
+
+ var newline = file.Newline;
+ var docsIndent = file.IndentAt(block.Start);
+ var childIndent = docsIndent + " ";
+ var paraIndent = childIndent + " ";
+ var paragraphs = docs.Paragraphs
+ .Select(paragraph => $"{paraIndent}{XmlEscape(paragraph)}")
+ .ToList();
+ var sourceLabel = docs.SourceKind == "android" ? "Android" : "Java";
+ paragraphs.Add(
+ $"{paraIndent}{sourceLabel} reference for {XmlEscape(docs.SourceLabel)}.");
+ if (docs.SourceKind == "android")
+ paragraphs.Add($"{paraIndent}{AndroidAttribution}");
+
+ var replacement =
+ $"{newline}" +
+ string.Join(newline, paragraphs) + newline +
+ $"{childIndent}";
+ var updatedBlock = blockText[..remarks.Index] + replacement + blockText[(remarks.Index + remarks.Length)..];
+ return text[..block.Start] + updatedBlock + text[block.End..];
+ }
+
static string RemoveAugmentedRemarksPlaceholder(string blockText) =>
Regex.Replace(
blockText,
@@ -1361,6 +1408,26 @@ static int RunSelfTest(string repositoryRoot)
abbreviationPage.TypeDocs?.Summary ==
"Distinguishes contained vs. not contained, e.g. in fixture input.",
"abbreviations do not truncate summaries");
+ var parenthesizedAbbreviationPage = SourcePage.Parse(
+ request,
+ androidHtml.Replace(
+ "Represents a fixture widget. The widget is used only by local importer tests.",
+ "Gets the fixture type (e.g. WIDGET). The widget is used only by local importer tests.",
+ StringComparison.Ordinal));
+ Assert(
+ parenthesizedAbbreviationPage.TypeDocs?.Summary ==
+ "Gets the fixture type (e.g. WIDGET).",
+ "parenthesized abbreviations do not truncate summaries");
+ var codeExamplePage = SourcePage.Parse(
+ request,
+ androidHtml.Replace(
+ "Sets the widget title. The exact JNI overload is required.
",
+ "Sets the widget title. The exact JNI overload is required.
widget.setTitle(title);
",
+ StringComparison.Ordinal));
+ Assert(
+ codeExamplePage.Members.Single(member => member.Name == "setTitle").Docs?.Paragraphs[0]
+ .Contains("widget.setTitle(title);", StringComparison.Ordinal) == true,
+ "Android code examples are retained as plain text");
var setTitle = file.Owners.Single(owner => owner.Id.Contains("SetTitle", StringComparison.Ordinal));
var pages = new Dictionary(StringComparer.Ordinal)
@@ -1812,6 +1879,43 @@ static int RunSelfTest(string repositoryRoot)
repairFailureReport.Entries[0].SourceUrl.Length > 0,
"repair-only mapping failure reported for summary");
+ const string augmentedRepairFixture =
+ "\n" +
+ " [Android.Runtime.Register(\"android/example/Widget\", DoNotGenerateAcw=true)]\n" +
+ " Existing documentation.To be added.Imported metadata.\n" +
+ "";
+ var augmentedRepairPath = Path.Combine(tempDirectory, "augmented-repair.xml");
+ File.WriteAllText(augmentedRepairPath, augmentedRepairFixture, new UTF8Encoding(false));
+ var augmentedRepairFile = LoadedFile.Load(repositoryRoot, augmentedRepairPath);
+ augmentedRepairFile.SelectOwners(null);
+ var augmentedRepairOwner = augmentedRepairFile.Owners.Single();
+ var augmentedRepairReport = new ImportReport
+ {
+ Mode = "dry-run",
+ Offline = true,
+ MaxChanges = 1,
+ };
+ var augmentedRepairMapping = MapOwner(
+ augmentedRepairOwner,
+ new Dictionary(StringComparer.Ordinal)
+ {
+ [augmentedRepairOwner.SourceRequest!.Url] = SourceLoadResult.Failure(
+ "offline_cache_miss",
+ "No cached official page exists for the fixture."),
+ });
+ Assert(
+ augmentedRepairOwner.Placeholders.Count == 0 &&
+ HasAugmentedRemarksPlaceholder(augmentedRepairFile, augmentedRepairOwner) &&
+ ReportMappingFailure(
+ augmentedRepairReport,
+ augmentedRepairFile,
+ augmentedRepairOwner,
+ augmentedRepairMapping) &&
+ augmentedRepairReport.Entries.Count == 1 &&
+ augmentedRepairReport.Entries[0].Target == "remarks" &&
+ augmentedRepairReport.Entries[0].Reason == "offline_cache_miss",
+ "repair-only mapping failure reported for remarks");
+
var tempPath = Path.Combine(tempDirectory, "source.xml");
File.WriteAllText(
tempPath,
@@ -1885,7 +1989,7 @@ static int RunSelfTest(string repositoryRoot)
Directory.Delete(tempDirectory, true);
}
- Console.WriteLine("SELF-TEST PASS: 56 assertions; path-only repository-wide non-API XML exclusion, exact Android/Java method and field matching, abbreviation-aware summaries, augmented-placeholder cleanup, truncated-summary repair, importer metadata remarks repair, standalone annotation skipping, exact Android table headings, deprecated Java block exclusion, exact-structure deprecated enum repair and failure reporting, self-closing remarks expansion, table alignment, quote-aware HTML cleanup, stale-link replacement, partial-write reporting, mismatch and low-value channel skipping, source cleanup, channel extraction, preservation, paragraph remarks, source-link ordering, CRLF atomic writes, and XML parsing.");
+ Console.WriteLine("SELF-TEST PASS: 59 assertions; path-only repository-wide non-API XML exclusion, exact Android/Java method and field matching, parenthesized abbreviation handling, plain-text code example preservation, augmented-placeholder cleanup, truncated-summary repair, repair-only failure reporting, importer metadata remarks repair, standalone annotation skipping, exact Android table headings, deprecated Java block exclusion, exact-structure deprecated enum repair and failure reporting, self-closing remarks expansion, table alignment, quote-aware HTML cleanup, stale-link replacement, partial-write reporting, mismatch and low-value channel skipping, source cleanup, channel extraction, preservation, paragraph remarks, source-link ordering, CRLF atomic writes, and XML parsing.");
return 0;
}
@@ -2605,7 +2709,7 @@ static SourcePage ParseAndroid(SourceRequest request, string html)
var exceptions = ExtractAndroidExceptions(fragment);
var prose = Regex.Replace(
fragment,
- @"<(?:table|pre|devsite-code)\b[^>]*>.*?(?:table|pre|devsite-code)>",
+ @"",
" ",
RegexOptions.Singleline | RegexOptions.IgnoreCase | RegexOptions.CultureInvariant);
var paragraphs = ExtractParagraphs(prose);
@@ -2837,15 +2941,30 @@ static string NoteSection(string notes, string heading)
return match.Success ? match.Groups["body"].Value : "";
}
- static List ExtractParagraphs(string html) =>
- Regex.Matches(
+ static List ExtractParagraphs(string html)
+ {
+ var paragraphs = new List();
+ foreach (Match match in Regex.Matches(
html,
- @"]*>(?
.*?)
",
- RegexOptions.Singleline | RegexOptions.IgnoreCase | RegexOptions.CultureInvariant)
- .Select(match => CleanSourceParagraph(HtmlText(match.Groups["body"].Value)))
- .Where(value => IsMeaningfulChannel(value, "remarks"))
- .Distinct(StringComparer.Ordinal)
- .ToList();
+ @"<(?p|pre|devsite-code)\b[^>]*>(?.*?)\k>",
+ RegexOptions.Singleline | RegexOptions.IgnoreCase | RegexOptions.CultureInvariant))
+ {
+ var value = CleanSourceParagraph(HtmlText(match.Groups["body"].Value, includeCode: true));
+ if (value.Length == 0)
+ continue;
+
+ if (match.Groups["tag"].Value.Equals("p", StringComparison.OrdinalIgnoreCase))
+ {
+ if (IsMeaningfulChannel(value, "remarks"))
+ paragraphs.Add(value);
+ }
+ else if (paragraphs.Count > 0)
+ {
+ paragraphs[^1] += " " + value;
+ }
+ }
+ return paragraphs.Distinct(StringComparer.Ordinal).ToList();
+ }
static List ExtractBlocks(string html) =>
Regex.Matches(
@@ -2881,11 +3000,13 @@ static Dictionary ParseAttributes(string attributes)
return result;
}
- static string HtmlText(string html)
+ static string HtmlText(string html, bool includeCode = false)
{
var withoutIgnored = Regex.Replace(
html,
- @"<(?:script|style|svg|pre|devsite-code)\b[^>]*>.*?(?:script|style|svg|pre|devsite-code)>",
+ includeCode
+ ? @"<(?:script|style|svg)\b[^>]*>.*?(?:script|style|svg)>"
+ : @"<(?:script|style|svg|pre|devsite-code)\b[^>]*>.*?(?:script|style|svg|pre|devsite-code)>",
" ",
RegexOptions.Singleline | RegexOptions.IgnoreCase | RegexOptions.CultureInvariant);
var withBreaks = Regex.Replace(
@@ -2957,7 +3078,8 @@ static bool IsAbbreviation(string text, int periodIndex)
var tokenStart = periodIndex;
while (tokenStart > 0 && !char.IsWhiteSpace(text[tokenStart - 1]))
tokenStart--;
- var token = text[tokenStart..(periodIndex + 1)];
+ var token = text[tokenStart..(periodIndex + 1)]
+ .TrimStart('(', '[', '{', '"', '\'');
return token.Equals("e.g.", StringComparison.OrdinalIgnoreCase) ||
token.Equals("i.e.", StringComparison.OrdinalIgnoreCase) ||
token.Equals("vs.", StringComparison.OrdinalIgnoreCase) ||
From b2b8a88234684b4477623c92c04ba282919b7591 Mon Sep 17 00:00:00 2001
From: Jonathan Peppers
Date: Thu, 20 Aug 2026 10:51:44 -0500
Subject: [PATCH 7/9] Repair ICU importer examples and summaries
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 090d0776-3020-428e-a4b0-e062232ad5ed
---
.../ConstrainedFieldPosition.xml | 29 +---
...teIntervalFormat+FormattedDateInterval.xml | 12 +-
.../DateTimePatternGenerator.xml | 160 ++++++++++++++----
.../ListFormatter+FormattedList.xml | 12 +-
...imeFormatter+FormattedRelativeDateTime.xml | 12 +-
.../Android.Icu.Text/UnicodeSetSpanner.xml | 8 +-
tools/importer.cs | 159 ++++++++++++++---
7 files changed, 276 insertions(+), 116 deletions(-)
diff --git a/docs/xml/Android.Icu.Text/ConstrainedFieldPosition.xml b/docs/xml/Android.Icu.Text/ConstrainedFieldPosition.xml
index ef7bf8fc4..939710851 100644
--- a/docs/xml/Android.Icu.Text/ConstrainedFieldPosition.xml
+++ b/docs/xml/Android.Icu.Text/ConstrainedFieldPosition.xml
@@ -139,30 +139,9 @@
The field class to fix when iterating.
Sets a constraint on the field class.
- Sets a constraint on the field class.
-
- When this instance of ConstrainedFieldPosition is passed to FormattedValue#nextPosition, positions are
- skipped unless the field is an instance of the class constraint, including subclasses.
-
- Any previously set constraints are cleared.
-
- For example, to loop over only the number-related fields:
- ConstrainedFieldPosition cfpos;
- cfpos.constrainClass(NumberFormat.Field.class);
- while (fmtval.nextPosition(cfpos)) {
- // handle the number-related field position
- }
-
-
-
- Java documentation for android.icu.text.ConstrainedFieldPosition.constrainClass(java.lang.Class<?>).
-
-
-
- Portions of this page are modifications based on work created and shared by the
- Android Open Source Project
- and used according to terms described in the
- Creative Commons 2.5 Attribution License.
+ Sets a constraint on the field class. When this instance of ConstrainedFieldPosition is passed to FormattedValue.nextPosition, positions are skipped unless the field is an instance of the class constraint, including subclasses. Any previously set constraints are cleared. For example, to loop over only the number-related fields:
+ Android reference for android.icu.text.ConstrainedFieldPosition.constrainClass.
+ Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
@@ -229,6 +208,7 @@
Gets the field for the current position.
The field saved in the instance. See above for null conditions.
+ Gets the field for the current position. The return value is well-defined and non-null only after FormattedValue#nextPosition returns true.
Android reference for android.icu.text.ConstrainedFieldPosition.getField.
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
@@ -534,6 +514,7 @@
The new exclusive end index.
Sets new values for the primary public getters.
+ Sets new values for the primary public getters. Intended to be used by FormattedValue implementations. It is up to the implementation to ensure that the user-requested constraints are satisfied. This method does not check!
Android reference for android.icu.text.ConstrainedFieldPosition.setState.
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
diff --git a/docs/xml/Android.Icu.Text/DateIntervalFormat+FormattedDateInterval.xml b/docs/xml/Android.Icu.Text/DateIntervalFormat+FormattedDateInterval.xml
index 519942a0d..42739399b 100644
--- a/docs/xml/Android.Icu.Text/DateIntervalFormat+FormattedDateInterval.xml
+++ b/docs/xml/Android.Icu.Text/DateIntervalFormat+FormattedDateInterval.xml
@@ -349,16 +349,8 @@
true if a new occurrence of the field was found; false otherwise.
Iterates over field positions in the FormattedValue. This lets you determine the position of specific types of substrings, like a month or a decimal separator. To loop over all field positions:
-
-
- Java documentation for android.icu.text.DateIntervalFormat.FormattedDateInterval.nextPosition(android.icu.text.ConstrainedFieldPosition).
-
-
-
- Portions of this page are modifications based on work created and shared by the
- Android Open Source Project
- and used according to terms described in the
- Creative Commons 2.5 Attribution License.
+ Android reference for android.icu.text.DateIntervalFormat.FormattedDateInterval.nextPosition.
+ Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
diff --git a/docs/xml/Android.Icu.Text/DateTimePatternGenerator.xml b/docs/xml/Android.Icu.Text/DateTimePatternGenerator.xml
index 1e11a9619..31355ad5a 100644
--- a/docs/xml/Android.Icu.Text/DateTimePatternGenerator.xml
+++ b/docs/xml/Android.Icu.Text/DateTimePatternGenerator.xml
@@ -165,7 +165,25 @@
Adds a pattern to the generator.
To be added.
- Adds a pattern to the generator. If the pattern has the same skeleton as an existing pattern, and the override parameter is set, then the previous value is overridden. Otherwise, the previous value is retained. In either case, the conflicting information is returned in PatternInfo. Note that single-field patterns (like "MMM") are automatically added, and don't need to be added explicitly! Example code: Date date= new GregorianCalendar(1999,9,13,23,58,59).getTime(); ULocale locale = ULocale.FRANCE; // Create an DateTimePatternGenerator instance for the given locale DateTimePatternGenerator gen = DateTimePatternGenerator.getInstance(locale); SimpleDateFormat format = new SimpleDateFormat(gen.getBestPattern("MMMMddHmm"), locale); DateTimePatternGenerator.PatternInfo returnInfo = new DateTimePatternGenerator.PatternInfo(); // Add '. von' to the existing pattern gen.addPattern("dd'. von' MMMM", true, returnInfo); // Apply the new pattern format.applyPattern(gen.getBestPattern("MMMMddHmm")); System.out.println("New Pattern for FRENCH: "+format.toPattern()); System.out.println("Date Time in new Pattern: "+format.format(date)); /** output of the sample code: ************************************************************************************************** New Pattern for FRENCH: dd. 'von' MMMM HH:mm Date Time in new Pattern: 13. von octobre 23:58 ************************************************************************************************* /
+ Adds a pattern to the generator. If the pattern has the same skeleton as an existing pattern, and the override parameter is set, then the previous value is overridden. Otherwise, the previous value is retained. In either case, the conflicting information is returned in PatternInfo. Note that single-field patterns (like "MMM") are automatically added, and don't need to be added explicitly! Example code:
+ Date date= new GregorianCalendar(1999,9,13,23,58,59).getTime();
+ULocale locale = ULocale.FRANCE;
+// Create an DateTimePatternGenerator instance for the given locale
+DateTimePatternGenerator gen = DateTimePatternGenerator.getInstance(locale);
+SimpleDateFormat format = new SimpleDateFormat(gen.getBestPattern("MMMMddHmm"), locale);
+DateTimePatternGenerator.PatternInfo returnInfo = new DateTimePatternGenerator.PatternInfo();
+// Add '. von' to the existing pattern
+gen.addPattern("dd'. von' MMMM", true, returnInfo);
+// Apply the new pattern
+format.applyPattern(gen.getBestPattern("MMMMddHmm"));
+System.out.println("New Pattern for FRENCH: "+format.toPattern());
+System.out.println("Date Time in new Pattern: "+format.format(date));
+
+/** output of the sample code:
+ **************************************************************************************************
+ New Pattern for FRENCH: dd. 'von' MMMM HH:mm
+ Date Time in new Pattern: 13. von octobre 23:58
+ *************************************************************************************************/
Android reference for android.icu.text.DateTimePatternGenerator.addPattern.
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
@@ -1019,19 +1037,81 @@
Return the best pattern matching the input skeleton.
Best pattern matching the input skeleton.
- Return the best pattern matching the input skeleton. It is guaranteed to
- have all of the fields in the skeleton.
- Example code:{
-
-
- Java documentation for android.icu.text.DateTimePatternGenerator.getBestPattern(java.lang.String).
-
-
-
- Portions of this page are modifications based on work created and shared by the
- Android Open Source Project
- and used according to terms described in the
- Creative Commons 2.5 Attribution License.
+ Return the best pattern matching the input skeleton. It is guaranteed to have all of the fields in the skeleton. Example code:
+ import java.util.Date;
+
+import android.icu.text.DateFormat;
+import android.icu.text.DateTimePatternGenerator;
+import android.icu.text.SimpleDateFormat;
+import android.icu.util.GregorianCalendar;
+import android.icu.util.TimeZone;
+import android.icu.util.ULocale;
+...
+final String[] skeletons = {
+ "yQQQQ", // year + full name of quarter, i.e., 4th quarter 1999
+ "yMMMM", // year + full name of month, i.e., October 1999
+ "MMMMd", // full name of month + day of the month, i.e., October 25
+ "hhmm", // 12-hour-cycle format, i.e., 1:32 PM
+ "jjmm" // preferred hour format for the given locale, i.e., 24-hour-cycle format for fr_FR
+};
+final ULocale[] locales = {
+ new ULocale ("en_US"),
+ new ULocale ("fr_FR"),
+ new ULocale ("zh_CN"),
+};
+DateTimePatternGenerator dtfg = null;
+Date date= new GregorianCalendar(1999,9,13,23,58,59).getTime();
+System.out.printf("%-20s%-35s%-35s%-35s\n\n", "Skeleton", "en_US", "fr_FR","zh_CN");
+for (String skeleton:skeletons) {
+ System.out.printf("%-20s", skeleton);
+ for (ULocale locale:locales) {
+ // create a DateTimePatternGenerator instance for given locale
+ dtfg = DateTimePatternGenerator.getInstance(locale);
+ // use getBestPattern method to get the best pattern for the given skeleton
+ String pattern = dtfg.getBestPattern(skeleton);
+ // Constructs a SimpleDateFormat with the best pattern generated above and the given locale
+ SimpleDateFormat sdf = new SimpleDateFormat(pattern, locale);
+ // Get the format of the given date
+ System.out.printf("%-35s",sdf.format(date));
+ }
+ System.out.println("\n");
+}
+/** output of the sample code:
+ *************************************************************************************************************
+ Skeleton en_US fr_FR zh_CN
+ yQQQQ 4th quarter 1999 4e trimestre 1999 1999\u5e74\u7b2c\u56db\u5b63\u5ea6
+ yMMMM October 1999 octobre 1999 1999\u5e7410\u6708
+ MMMMd October 13 13 octobre 10\u670813\u65e5
+ hhmm 11:58 PM 11:58 PM \u4e0b\u534811:58
+ jjmm 11:58 PM 23:58 \u4e0b\u534811:58
+ **************************************************************************************************************/
+// Use DateTime.getPatternInstance to produce the same Date/Time format with predefined constant field value
+final String[] dtfskeleton = {
+ DateFormat.YEAR_QUARTER, // year + full name of quarter, i.e., 4th quarter 1999
+ DateFormat.YEAR_MONTH, // year + full name of month, i.e., October 1999
+ DateFormat.MONTH_DAY // full name of month + day of the month, i.e., October 25
+};
+System.out.printf("%-20s%-35s%-35s%-35s\n\n", "Skeleton", "en_US", "fr_FR","zh_CN");
+for (String skeleton:dtfskeleton) {
+ System.out.printf("%-20s", skeleton);
+ for (ULocale locale:locales) {
+ // Use DateFormat.getPatternInstance to get the date/time format for the locale,
+ // and apply the format to the given date
+ String df=DateFormat.getPatternInstance(skeleton,locale).format(date);
+ System.out.printf("%-35s",df);
+ }
+ System.out.println("\n");
+}
+
+/** output of the sample code:
+ ************************************************************************************************************
+ Skeleton en_US fr_FR zh_CN
+ yQQQQ 4th quarter 1999 4e trimestre 1999 1999\u5e74\u7b2c\u56db\u5b63\u5ea6
+ yMMMM October 1999 octobre 1999 1999\u5e7410\u6708
+ MMMMd October 13 13 octobre 10\u670813\u65e5
+ ************************************************************************************************************/
+ Android reference for android.icu.text.DateTimePatternGenerator.getBestPattern.
+ Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
@@ -1172,6 +1252,7 @@
The general interface to get a display name for a particular date/time field, in one of several possible display widths.
The display name for the field
+ The general interface to get a display name for a particular date/time field, in one of several possible display widths.
Android reference for android.icu.text.DateTimePatternGenerator.getFieldDisplayName.
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
@@ -1840,22 +1921,41 @@
in a skeleton.
pattern adjusted to match the skeleton fields widths and subtypes.
- Adjusts the field types (width and subtype) of a pattern to match what is
- in a skeleton. That is, if you supply a pattern like "d-M H:m", and a
- skeleton of "MMMMddhhmm", then the input pattern is adjusted to be
- "dd-MMMM hh:mm". This is used internally to get the best match for the
- input skeleton, but can also be used externally.
- Example code:{
-
-
- Java documentation for android.icu.text.DateTimePatternGenerator.replaceFieldTypes(java.lang.String, java.lang.String).
-
-
-
- Portions of this page are modifications based on work created and shared by the
- Android Open Source Project
- and used according to terms described in the
- Creative Commons 2.5 Attribution License.
+ Adjusts the field types (width and subtype) of a pattern to match what is in a skeleton. That is, if you supply a pattern like "d-M H:m", and a skeleton of "MMMMddhhmm", then the input pattern is adjusted to be "dd-MMMM hh:mm". This is used internally to get the best match for the input skeleton, but can also be used externally. Example code:
+ Date date= new GregorianCalendar(1999,9,13,23,58,59).getTime();
+TimeZone zone = TimeZone.getTimeZone("Europe/Paris");
+ULocale locale = ULocale.FRANCE;
+DateTimePatternGenerator gen = DateTimePatternGenerator.getInstance(locale);
+SimpleDateFormat format = new SimpleDateFormat("EEEE d MMMM y HH:mm:ss zzzz",locale);
+format.setTimeZone(zone);
+String pattern = format.toPattern();
+System.out.println("Pattern before replacement:");
+System.out.println(pattern);
+System.out.println("Date/Time format in fr_FR:");
+System.out.println(format.format(date));
+// Replace zone "zzzz" in the pattern with "vvvv"
+String newPattern = gen.replaceFieldTypes(pattern, "vvvv");
+// Apply the new pattern
+format.applyPattern(newPattern);
+System.out.println("Pattern after replacement:");
+System.out.println(newPattern);
+System.out.println("Date/Time format in fr_FR:");
+System.out.println(format.format(date));
+
+/** output of the sample code:
+***************************************************************************************************
+ Pattern before replacement:
+ EEEE d MMMM y HH:mm:ss zzzz
+ Date/Time format in fr_FR:
+ jeudi 14 octobre 1999 05:58:59 heure avancée d\u2019Europe centrale
+ Pattern after replacement:
+ EEEE d MMMM y HH:mm:ss vvvv
+ Date/Time format in fr_FR:
+ jeudi 14 octobre 1999 05:58:59 heure de l\u2019Europe centrale
+
+**************************************************************************************************/
+ Android reference for android.icu.text.DateTimePatternGenerator.replaceFieldTypes.
+ Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
diff --git a/docs/xml/Android.Icu.Text/ListFormatter+FormattedList.xml b/docs/xml/Android.Icu.Text/ListFormatter+FormattedList.xml
index 5b338a7da..ec33b8e67 100644
--- a/docs/xml/Android.Icu.Text/ListFormatter+FormattedList.xml
+++ b/docs/xml/Android.Icu.Text/ListFormatter+FormattedList.xml
@@ -349,16 +349,8 @@
true if a new occurrence of the field was found; false otherwise.
Iterates over field positions in the FormattedValue. This lets you determine the position of specific types of substrings, like a month or a decimal separator. To loop over all field positions:
-
-
- Java documentation for android.icu.text.ListFormatter.FormattedList.nextPosition(android.icu.text.ConstrainedFieldPosition).
-
-
-
- Portions of this page are modifications based on work created and shared by the
- Android Open Source Project
- and used according to terms described in the
- Creative Commons 2.5 Attribution License.
+ Android reference for android.icu.text.ListFormatter.FormattedList.nextPosition.
+ Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
diff --git a/docs/xml/Android.Icu.Text/RelativeDateTimeFormatter+FormattedRelativeDateTime.xml b/docs/xml/Android.Icu.Text/RelativeDateTimeFormatter+FormattedRelativeDateTime.xml
index c4b0539b4..a82d7862b 100644
--- a/docs/xml/Android.Icu.Text/RelativeDateTimeFormatter+FormattedRelativeDateTime.xml
+++ b/docs/xml/Android.Icu.Text/RelativeDateTimeFormatter+FormattedRelativeDateTime.xml
@@ -363,16 +363,8 @@
true if a new occurrence of the field was found; false otherwise.
Iterates over field positions in the FormattedValue. This lets you determine the position of specific types of substrings, like a month or a decimal separator. To loop over all field positions:
-
-
- Java documentation for android.icu.text.RelativeDateTimeFormatter.FormattedRelativeDateTime.nextPosition(android.icu.text.ConstrainedFieldPosition).
-
-
-
- Portions of this page are modifications based on work created and shared by the
- Android Open Source Project
- and used according to terms described in the
- Creative Commons 2.5 Attribution License.
+ Android reference for android.icu.text.RelativeDateTimeFormatter.FormattedRelativeDateTime.nextPosition.
+ Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
diff --git a/docs/xml/Android.Icu.Text/UnicodeSetSpanner.xml b/docs/xml/Android.Icu.Text/UnicodeSetSpanner.xml
index 194f042ab..0c3f2add1 100644
--- a/docs/xml/Android.Icu.Text/UnicodeSetSpanner.xml
+++ b/docs/xml/Android.Icu.Text/UnicodeSetSpanner.xml
@@ -1097,9 +1097,9 @@
Returns a trimmed sequence (using CharSequence.subSequence()), that omits matching elements at the start or end of the string, using the trimOption and SpanCondition.SIMPLE.
a subsequence
- Returns a trimmed sequence (using CharSequence.subSequence()), that omits matching elements at the start or end of the string, using the trimOption and SpanCondition.SIMPLE. For example:... returns "catbab".
+ Returns a trimmed sequence (using CharSequence.subsequence()), that omits matching elements at the start or end of the string, using the trimOption and SpanCondition.SIMPLE. For example:... returns "catbab".
Android reference for android.icu.text.UnicodeSetSpanner.trim.
- Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
+ Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
@@ -1138,9 +1138,9 @@
Returns a trimmed sequence (using CharSequence.subSequence()), that omits matching elements at the start or end of the string, depending on the trimOption and spanCondition.
a subsequence
- Returns a trimmed sequence (using CharSequence.subSequence()), that omits matching elements at the start or end of the string, depending on the trimOption and spanCondition. For example:... returns "catbab".
+ Returns a trimmed sequence (using CharSequence.subsequence()), that omits matching elements at the start or end of the string, depending on the trimOption and spanCondition. For example:... returns "catbab".
Android reference for android.icu.text.UnicodeSetSpanner.trim.
- Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
+ Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
diff --git a/tools/importer.cs b/tools/importer.cs
index 8697f6310..d2c0f080c 100644
--- a/tools/importer.cs
+++ b/tools/importer.cs
@@ -93,7 +93,8 @@ public static async Task RunAsync(string[] args)
IsEnumSummaryRepairCandidate(item.Owner) ||
HasAugmentedRemarksPlaceholder(item.File, item.Owner) ||
HasTruncatedImporterSummary(item.File, item.Owner) ||
- HasIncompleteCodeExampleRemarks(item.File, item.Owner))
+ HasIncompleteCodeExampleRemarks(item.File, item.Owner) ||
+ HasMetadataOnlyRemarks(item.File, item.Owner))
.Select(item => item.Owner.SourceRequest)
.Where(request => request is not null)
.Cast()
@@ -215,14 +216,19 @@ public static async Task RunAsync(string[] args)
var augmentedRemarksRepair = HasAugmentedRemarksPlaceholder(file, owner);
var truncatedSummaryRepair = HasTruncatedImporterSummary(file, owner);
var codeExampleRepair = HasIncompleteCodeExampleRemarks(file, owner);
+ var metadataOnlyRemarksRepair = HasMetadataOnlyRemarks(file, owner);
if (!ownerChanged &&
mapping.Docs is not null &&
- (enumSummaryRepair || augmentedRemarksRepair || truncatedSummaryRepair || codeExampleRepair))
+ (enumSummaryRepair ||
+ augmentedRemarksRepair ||
+ truncatedSummaryRepair ||
+ codeExampleRepair ||
+ metadataOnlyRemarksRepair))
{
var refreshed = truncatedSummaryRepair
? ReplaceTruncatedSummary(text, file, owner, mapping.Docs)
: text;
- if (codeExampleRepair)
+ if (codeExampleRepair || metadataOnlyRemarksRepair)
refreshed = ReplaceIncompleteCodeExampleRemarks(refreshed, file, owner, mapping.Docs);
if (enumSummaryRepair || augmentedRemarksRepair)
{
@@ -528,7 +534,9 @@ static bool ReportMappingFailure(
.ToHashSet(StringComparer.Ordinal);
if (IsEnumSummaryRepairCandidate(owner) || HasTruncatedImporterSummary(file, owner))
targets.Add("summary");
- if (HasAugmentedRemarksPlaceholder(file, owner) || HasIncompleteCodeExampleRemarks(file, owner))
+ if (HasAugmentedRemarksPlaceholder(file, owner) ||
+ HasIncompleteCodeExampleRemarks(file, owner) ||
+ HasMetadataOnlyRemarks(file, owner))
targets.Add("remarks");
foreach (var target in targets.OrderBy(target => target, StringComparer.Ordinal))
@@ -852,7 +860,8 @@ static string AddSourceDocumentationIfSafe(
blockText = RemoveStaleSourceLinks(blockText, docs.SourceUrl, removeAll: false);
blockText = RemoveAugmentedRemarksPlaceholder(blockText);
- if (ContainsSourceUrl(blockText, docs.SourceUrl))
+ var metadataOnly = HasMetadataOnlyRemarks(blockText);
+ if (ContainsSourceUrl(blockText, docs.SourceUrl) && !metadataOnly)
return text[..block.Start] + blockText + text[block.End..];
var remarks = owner.Docs.Element("remarks");
@@ -860,6 +869,7 @@ static string AddSourceDocumentationIfSafe(
var attributionOnly = remarks is null ||
remarksText.Length == 0 ||
remarksText.Equals("To be added.", StringComparison.Ordinal) ||
+ metadataOnly ||
remarksText.StartsWith(
"Portions of this page are modifications based on work created and shared by",
StringComparison.Ordinal);
@@ -874,7 +884,7 @@ static string AddSourceDocumentationIfSafe(
if (attributionOnly && !replacedRemarksPlaceholder && docs.Paragraphs.Count > 0)
{
foreach (var paragraph in docs.Paragraphs)
- additions.Add($"{paraIndent}{XmlEscape(paragraph)}");
+ additions.Add($"{paraIndent}{XmlEscapeDocumentationParagraph(paragraph)}");
}
var sourceLabel = docs.SourceKind == "android" ? "Android" : "Java";
additions.Add(
@@ -950,8 +960,7 @@ static bool HasTruncatedImporterSummary(LoadedFile file, DocsOwner owner)
{
var summary = owner.Docs.Element("summary")?.Value.Trim();
if (summary is null ||
- (!summary.EndsWith("e.g.", StringComparison.OrdinalIgnoreCase) &&
- !summary.EndsWith("vs.", StringComparison.OrdinalIgnoreCase)))
+ !HasTruncatedSummaryEnding(summary))
{
return false;
}
@@ -967,8 +976,38 @@ static bool HasIncompleteCodeExampleRemarks(LoadedFile file, DocsOwner owner)
var block = file.DocsBlocks[owner.Order];
var blockText = file.Text[block.Start..block.End];
return blockText.Contains("title=\"Reference documentation\"", StringComparison.Ordinal) &&
- (blockText.Contains("Example code:", StringComparison.Ordinal) ||
- blockText.Contains("expression: will be true", StringComparison.Ordinal));
+ Regex.IsMatch(
+ blockText,
+ @"(?:Example code:\s*(?:\{|)|Example code:.*?//|expression:\s*will be true|For example:\s*\.\.\.|For example,\s+to loop\b.*?:\s+[A-Z]|To loop over\b.*?:)",
+ RegexOptions.Singleline | RegexOptions.IgnoreCase | RegexOptions.CultureInvariant);
+ }
+
+ static bool HasMetadataOnlyRemarks(LoadedFile file, DocsOwner owner)
+ {
+ var block = file.DocsBlocks[owner.Order];
+ return HasMetadataOnlyRemarks(file.Text[block.Start..block.End]);
+ }
+
+ static bool HasMetadataOnlyRemarks(string blockText)
+ {
+ var remarks = Regex.Match(
+ blockText,
+ @"]*>(?.*?)",
+ RegexOptions.Singleline | RegexOptions.CultureInvariant);
+ if (!remarks.Success)
+ return false;
+
+ var withoutMetadata = Regex.Replace(
+ remarks.Groups["body"].Value,
+ @"]*>(?:(?!).)*?(?:title=""Reference documentation""|https://developers\.google\.com/terms/site-policies)(?:(?!).)*?",
+ "",
+ RegexOptions.Singleline | RegexOptions.CultureInvariant);
+ return NormalizeText(
+ Regex.Replace(
+ withoutMetadata,
+ @"<[^>]*>",
+ " ",
+ RegexOptions.Singleline | RegexOptions.CultureInvariant)).Length == 0;
}
static string ReplaceIncompleteCodeExampleRemarks(
@@ -991,7 +1030,7 @@ static string ReplaceIncompleteCodeExampleRemarks(
var childIndent = docsIndent + " ";
var paraIndent = childIndent + " ";
var paragraphs = docs.Paragraphs
- .Select(paragraph => $"{paraIndent}{XmlEscape(paragraph)}")
+ .Select(paragraph => $"{paraIndent}{XmlEscapeDocumentationParagraph(paragraph)}")
.ToList();
var sourceLabel = docs.SourceKind == "android" ? "Android" : "Java";
paragraphs.Add(
@@ -1027,9 +1066,7 @@ static string ReplaceTruncatedSummary(
blockText,
@"]*>(?[^<]*)",
RegexOptions.CultureInvariant);
- if (!summary.Success ||
- (!summary.Groups["value"].Value.TrimEnd().EndsWith("e.g.", StringComparison.OrdinalIgnoreCase) &&
- !summary.Groups["value"].Value.TrimEnd().EndsWith("vs.", StringComparison.OrdinalIgnoreCase)))
+ if (!summary.Success || !HasTruncatedSummaryEnding(summary.Groups["value"].Value.TrimEnd()))
{
return text;
}
@@ -1040,6 +1077,11 @@ static string ReplaceTruncatedSummary(
return text[..block.Start] + updatedBlock + text[block.End..];
}
+ static bool HasTruncatedSummaryEnding(string summary) =>
+ summary.EndsWith("e.g.", StringComparison.OrdinalIgnoreCase) ||
+ summary.EndsWith("vs.", StringComparison.OrdinalIgnoreCase) ||
+ summary.EndsWith("...", StringComparison.Ordinal);
+
static string RemoveStaleSourceLinks(
string blockText,
string sourceUrl,
@@ -1245,6 +1287,11 @@ static int ClosingInsertionPoint(string text, int closingTag, string newline)
static string XmlEscape(string value) =>
new XText(CleanSourceText(value)).ToString(SaveOptions.DisableFormatting);
+ static string XmlEscapeDocumentationParagraph(string value) =>
+ value.Contains('\n')
+ ? new XText(value).ToString(SaveOptions.DisableFormatting)
+ : XmlEscape(value);
+
static string XmlAttributeEscape(string value) =>
SecurityElementEscape(value).Replace("\"", """, StringComparison.Ordinal);
@@ -1392,6 +1439,7 @@ static int RunSelfTest(string repositoryRoot)
var androidHtml = File.ReadAllText(Path.Combine(fixtureRoot, "android-reference.html"));
var javaHtml = File.ReadAllText(Path.Combine(fixtureRoot, "java-reference.html"));
var file = LoadedFile.Load(repositoryRoot, sourcePath);
+ var fixtureText = file.Text;
file.SelectOwners(null);
Assert(file.Owners.Count == 6, "fixture owner count");
@@ -1418,16 +1466,26 @@ static int RunSelfTest(string repositoryRoot)
parenthesizedAbbreviationPage.TypeDocs?.Summary ==
"Gets the fixture type (e.g. WIDGET).",
"parenthesized abbreviations do not truncate summaries");
+ var ellipsisPage = SourcePage.Parse(
+ request,
+ androidHtml.Replace(
+ "Represents a fixture widget. The widget is used only by local importer tests.",
+ "Represents a fixture widget... including its title. The widget is used only by local importer tests.",
+ StringComparison.Ordinal));
+ Assert(
+ ellipsisPage.TypeDocs?.Summary ==
+ "Represents a fixture widget... including its title.",
+ "ellipses do not truncate summaries");
var codeExamplePage = SourcePage.Parse(
request,
androidHtml.Replace(
"Sets the widget title. The exact JNI overload is required.
",
- "Sets the widget title. The exact JNI overload is required.
widget.setTitle(title);
",
+ "Sets the widget title. The exact JNI overload is required.
// preserve comments\nwidget.setTitle(title);\n/* done */
",
StringComparison.Ordinal));
Assert(
- codeExamplePage.Members.Single(member => member.Name == "setTitle").Docs?.Paragraphs[0]
- .Contains("widget.setTitle(title);", StringComparison.Ordinal) == true,
- "Android code examples are retained as plain text");
+ codeExamplePage.Members.Single(member => member.Name == "setTitle").Docs?.Paragraphs[1] ==
+ "// preserve comments\nwidget.setTitle(title);\n/* done */",
+ "Android code examples preserve line breaks and syntax tokens");
var setTitle = file.Owners.Single(owner => owner.Id.Contains("SetTitle", StringComparison.Ordinal));
var pages = new Dictionary(StringComparer.Ordinal)
@@ -1455,10 +1513,32 @@ static int RunSelfTest(string repositoryRoot)
Assert(
!cleanedRemarksText.Contains(augmentedRemarks, StringComparison.Ordinal),
"augmented remarks placeholder is removed");
- file.UpdateBlockOffsets(setTitle.Order, file.Text);
+ file.UpdateBlockOffsets(setTitle.Order, fixtureText);
+ var sourceOnlyRemarks = $@"{file.Newline} Android reference for {mappedDocs.SourceLabel}.{file.Newline} {AndroidAttribution}{file.Newline} ";
+ var metadataOnlyText = Regex.Replace(
+ file.Text,
+ @"\s*Keep this existing prose\..*?",
+ _ => sourceOnlyRemarks,
+ RegexOptions.Singleline | RegexOptions.CultureInvariant);
+ Assert(
+ !metadataOnlyText.Equals(file.Text, StringComparison.Ordinal),
+ "metadata-only remarks fixture setup");
+ file.UpdateBlockOffsets(setTitle.Order, metadataOnlyText);
+ var restoredMetadataOnlyText = AddSourceDocumentationIfSafe(
+ metadataOnlyText,
+ file,
+ setTitle,
+ mappedDocs);
+ Assert(
+ HasMetadataOnlyRemarks(metadataOnlyText[file.DocsBlocks[setTitle.Order].Start..file.DocsBlocks[setTitle.Order].End]) &&
+ restoredMetadataOnlyText.Contains(
+ "Sets the widget title. The exact JNI overload is required.",
+ StringComparison.Ordinal),
+ "metadata-only remarks are refreshed from source");
+ file.UpdateBlockOffsets(setTitle.Order, fixtureText);
var truncatedSummaryText = file.Text.Replace(
"To be added.",
- "Distinguishes fixtures vs.",
+ "Distinguishes fixtures...",
StringComparison.Ordinal);
var repairedSummaryText = ReplaceTruncatedSummary(
truncatedSummaryText,
@@ -1469,7 +1549,7 @@ static int RunSelfTest(string repositoryRoot)
repairedSummaryText.Contains(
"Sets the widget title.",
StringComparison.Ordinal),
- "truncated importer summary is replaced from source");
+ "ellipsis-truncated importer summary is replaced from source");
var titleParameter = setTitle.Placeholders.Single(item => item.Name == "param");
Assert(
ReplacementFor(titleParameter, mappedDocs).Text == "the title to display",
@@ -1989,7 +2069,7 @@ static int RunSelfTest(string repositoryRoot)
Directory.Delete(tempDirectory, true);
}
- Console.WriteLine("SELF-TEST PASS: 59 assertions; path-only repository-wide non-API XML exclusion, exact Android/Java method and field matching, parenthesized abbreviation handling, plain-text code example preservation, augmented-placeholder cleanup, truncated-summary repair, repair-only failure reporting, importer metadata remarks repair, standalone annotation skipping, exact Android table headings, deprecated Java block exclusion, exact-structure deprecated enum repair and failure reporting, self-closing remarks expansion, table alignment, quote-aware HTML cleanup, stale-link replacement, partial-write reporting, mismatch and low-value channel skipping, source cleanup, channel extraction, preservation, paragraph remarks, source-link ordering, CRLF atomic writes, and XML parsing.");
+ Console.WriteLine("SELF-TEST PASS: 66 assertions; path-only repository-wide non-API XML exclusion, exact Android/Java method and field matching, parenthesized abbreviation and ellipsis handling, line-preserving code example extraction, augmented and metadata-only remarks repair, truncated-summary repair, repair-only failure reporting, importer metadata remarks repair, standalone annotation skipping, exact Android table headings, deprecated Java block exclusion, exact-structure deprecated enum repair and failure reporting, self-closing remarks expansion, table alignment, quote-aware HTML cleanup, stale-link replacement, partial-write reporting, mismatch and low-value channel skipping, source cleanup, channel extraction, preservation, paragraph remarks, source-link ordering, CRLF atomic writes, and XML parsing.");
return 0;
}
@@ -2949,18 +3029,21 @@ static List ExtractParagraphs(string html)
@"<(?p|pre|devsite-code)\b[^>]*>(?.*?)\k>",
RegexOptions.Singleline | RegexOptions.IgnoreCase | RegexOptions.CultureInvariant))
{
- var value = CleanSourceParagraph(HtmlText(match.Groups["body"].Value, includeCode: true));
+ var isCode = !match.Groups["tag"].Value.Equals("p", StringComparison.OrdinalIgnoreCase);
+ var value = isCode
+ ? HtmlCodeText(match.Groups["body"].Value)
+ : CleanSourceParagraph(HtmlText(match.Groups["body"].Value));
if (value.Length == 0)
continue;
- if (match.Groups["tag"].Value.Equals("p", StringComparison.OrdinalIgnoreCase))
+ if (!isCode)
{
if (IsMeaningfulChannel(value, "remarks"))
paragraphs.Add(value);
}
else if (paragraphs.Count > 0)
{
- paragraphs[^1] += " " + value;
+ paragraphs.Add(value);
}
}
return paragraphs.Distinct(StringComparer.Ordinal).ToList();
@@ -3017,7 +3100,21 @@ static string HtmlText(string html, bool includeCode = false)
return CleanSourceText(StripHtmlTags(withBreaks));
}
- static string StripHtmlTags(string html)
+ static string HtmlCodeText(string html)
+ {
+ var withoutIgnored = Regex.Replace(
+ html,
+ @"<(?:script|style|svg)\b[^>]*>.*?(?:script|style|svg)>",
+ "",
+ RegexOptions.Singleline | RegexOptions.IgnoreCase | RegexOptions.CultureInvariant);
+ var code = StripHtmlTags(withoutIgnored, addWhitespace: false);
+ return WebUtility.HtmlDecode(code)
+ .Replace("\r\n", "\n", StringComparison.Ordinal)
+ .Replace('\r', '\n')
+ .Trim('\n');
+ }
+
+ static string StripHtmlTags(string html, bool addWhitespace = true)
{
var text = new StringBuilder(html.Length);
var inTag = false;
@@ -3030,7 +3127,8 @@ static string StripHtmlTags(string html)
{
inTag = true;
quote = '\0';
- text.Append(' ');
+ if (addWhitespace)
+ text.Append(' ');
}
else
{
@@ -3062,7 +3160,7 @@ static string FirstSentence(string text)
{
if (text[index] is not ('.' or '!' or '?') ||
(index + 1 < text.Length && !char.IsWhiteSpace(text[index + 1])) ||
- (text[index] == '.' && IsAbbreviation(text, index)))
+ (text[index] == '.' && (IsAbbreviation(text, index) || IsEllipsis(text, index))))
{
continue;
}
@@ -3073,6 +3171,11 @@ static string FirstSentence(string text)
return text;
}
+ static bool IsEllipsis(string text, int periodIndex) =>
+ periodIndex >= 2 &&
+ text[periodIndex - 1] == '.' &&
+ text[periodIndex - 2] == '.';
+
static bool IsAbbreviation(string text, int periodIndex)
{
var tokenStart = periodIndex;
From 9cf3b3dcd2aa081d342a4b6bac14684b4a0b147a Mon Sep 17 00:00:00 2001
From: Jonathan Peppers
Date: Thu, 20 Aug 2026 14:32:00 -0500
Subject: [PATCH 8/9] Preserve nested ICU documentation code
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 090d0776-3020-428e-a4b0-e062232ad5ed
---
.../ConstrainedFieldPosition.xml | 12 +
...teIntervalFormat+FormattedDateInterval.xml | 5 +
.../DateTimePatternGenerator.xml | 16 +-
.../ListFormatter+FormattedList.xml | 5 +
...imeFormatter+FormattedRelativeDateTime.xml | 5 +
.../Android.Icu.Text/UnicodeSetSpanner.xml | 33 ++-
tools/importer.cs | 235 +++++++++++++-----
7 files changed, 226 insertions(+), 85 deletions(-)
diff --git a/docs/xml/Android.Icu.Text/ConstrainedFieldPosition.xml b/docs/xml/Android.Icu.Text/ConstrainedFieldPosition.xml
index 939710851..22c403e7f 100644
--- a/docs/xml/Android.Icu.Text/ConstrainedFieldPosition.xml
+++ b/docs/xml/Android.Icu.Text/ConstrainedFieldPosition.xml
@@ -139,7 +139,13 @@
The field class to fix when iterating.
Sets a constraint on the field class.
+ public void constrainClass (Class<?> classConstraint)
Sets a constraint on the field class. When this instance of ConstrainedFieldPosition is passed to FormattedValue.nextPosition, positions are skipped unless the field is an instance of the class constraint, including subclasses. Any previously set constraints are cleared. For example, to loop over only the number-related fields:
+ ConstrainedFieldPosition cfpos;
+cfpos.constrainClass(NumberFormat.Field.class);
+while (fmtval.nextPosition(cfpos)) {
+ // handle the number-related field position
+}
Android reference for android.icu.text.ConstrainedFieldPosition.constrainClass.
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
@@ -175,7 +181,13 @@
The field to fix when iterating.
Sets a constraint on the field.
+ public void constrainField (Format.Field field)
Sets a constraint on the field. When this instance of ConstrainedFieldPosition is passed to FormattedValue.nextPosition, positions are skipped unless they have the given field. Any previously set constraints are cleared. For example, to loop over all grouping separators: Changing the constraint while in the middle of iterating over a FormattedValue does not generally have well-defined behavior.
+ ConstrainedFieldPosition cfpos;
+cfpos.constrainField(NumberFormat.Field.GROUPING_SEPARATOR);
+while (fmtval.nextPosition(cfpos)) {
+ // handle the grouping separator position
+}
Android reference for android.icu.text.ConstrainedFieldPosition.constrainField.
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
diff --git a/docs/xml/Android.Icu.Text/DateIntervalFormat+FormattedDateInterval.xml b/docs/xml/Android.Icu.Text/DateIntervalFormat+FormattedDateInterval.xml
index 42739399b..d55db6b3f 100644
--- a/docs/xml/Android.Icu.Text/DateIntervalFormat+FormattedDateInterval.xml
+++ b/docs/xml/Android.Icu.Text/DateIntervalFormat+FormattedDateInterval.xml
@@ -348,7 +348,12 @@
Iterates over field positions in the FormattedValue.
true if a new occurrence of the field was found; false otherwise.
+ public boolean nextPosition (ConstrainedFieldPosition cfpos)
Iterates over field positions in the FormattedValue. This lets you determine the position of specific types of substrings, like a month or a decimal separator. To loop over all field positions:
+ ConstrainedFieldPosition cfpos = new ConstrainedFieldPosition();
+ while (fmtval.nextPosition(cfpos)) {
+ // handle the field position; get information from cfpos
+ }
Android reference for android.icu.text.DateIntervalFormat.FormattedDateInterval.nextPosition.
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
diff --git a/docs/xml/Android.Icu.Text/DateTimePatternGenerator.xml b/docs/xml/Android.Icu.Text/DateTimePatternGenerator.xml
index 31355ad5a..46cb417a1 100644
--- a/docs/xml/Android.Icu.Text/DateTimePatternGenerator.xml
+++ b/docs/xml/Android.Icu.Text/DateTimePatternGenerator.xml
@@ -165,8 +165,11 @@
Adds a pattern to the generator.
To be added.
- Adds a pattern to the generator. If the pattern has the same skeleton as an existing pattern, and the override parameter is set, then the previous value is overridden. Otherwise, the previous value is retained. In either case, the conflicting information is returned in PatternInfo. Note that single-field patterns (like "MMM") are automatically added, and don't need to be added explicitly! Example code:
- Date date= new GregorianCalendar(1999,9,13,23,58,59).getTime();
+ public DateTimePatternGenerator addPattern (String pattern,
+ boolean override,
+ DateTimePatternGenerator.PatternInfo returnInfo)
+ Example code:
+ Date date= new GregorianCalendar(1999,9,13,23,58,59).getTime();
ULocale locale = ULocale.FRANCE;
// Create an DateTimePatternGenerator instance for the given locale
DateTimePatternGenerator gen = DateTimePatternGenerator.getInstance(locale);
@@ -183,7 +186,7 @@ System.out.println("Date Time in new Pattern: "+format.format(date));
**************************************************************************************************
New Pattern for FRENCH: dd. 'von' MMMM HH:mm
Date Time in new Pattern: 13. von octobre 23:58
- *************************************************************************************************/
+ *************************************************************************************************/
Android reference for android.icu.text.DateTimePatternGenerator.addPattern.
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
@@ -1037,8 +1040,9 @@ System.out.println("Date Time in new Pattern: "+format.format(date));
Return the best pattern matching the input skeleton.
Best pattern matching the input skeleton.
- Return the best pattern matching the input skeleton. It is guaranteed to have all of the fields in the skeleton. Example code:
- import java.util.Date;
+ public String getBestPattern (String skeleton)
+ Example code:
+ import java.util.Date;
import android.icu.text.DateFormat;
import android.icu.text.DateTimePatternGenerator;
@@ -1109,7 +1113,7 @@ for (String skeleton:dtfskeleton) {
yQQQQ 4th quarter 1999 4e trimestre 1999 1999\u5e74\u7b2c\u56db\u5b63\u5ea6
yMMMM October 1999 octobre 1999 1999\u5e7410\u6708
MMMMd October 13 13 octobre 10\u670813\u65e5
- ************************************************************************************************************/
+ ************************************************************************************************************/
Android reference for android.icu.text.DateTimePatternGenerator.getBestPattern.
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
diff --git a/docs/xml/Android.Icu.Text/ListFormatter+FormattedList.xml b/docs/xml/Android.Icu.Text/ListFormatter+FormattedList.xml
index ec33b8e67..ad16aac0b 100644
--- a/docs/xml/Android.Icu.Text/ListFormatter+FormattedList.xml
+++ b/docs/xml/Android.Icu.Text/ListFormatter+FormattedList.xml
@@ -348,7 +348,12 @@
Iterates over field positions in the FormattedValue.
true if a new occurrence of the field was found; false otherwise.
+ public boolean nextPosition (ConstrainedFieldPosition cfpos)
Iterates over field positions in the FormattedValue. This lets you determine the position of specific types of substrings, like a month or a decimal separator. To loop over all field positions:
+ ConstrainedFieldPosition cfpos = new ConstrainedFieldPosition();
+ while (fmtval.nextPosition(cfpos)) {
+ // handle the field position; get information from cfpos
+ }
Android reference for android.icu.text.ListFormatter.FormattedList.nextPosition.
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
diff --git a/docs/xml/Android.Icu.Text/RelativeDateTimeFormatter+FormattedRelativeDateTime.xml b/docs/xml/Android.Icu.Text/RelativeDateTimeFormatter+FormattedRelativeDateTime.xml
index a82d7862b..589c29006 100644
--- a/docs/xml/Android.Icu.Text/RelativeDateTimeFormatter+FormattedRelativeDateTime.xml
+++ b/docs/xml/Android.Icu.Text/RelativeDateTimeFormatter+FormattedRelativeDateTime.xml
@@ -362,7 +362,12 @@
Iterates over field positions in the FormattedValue.
true if a new occurrence of the field was found; false otherwise.
+ public boolean nextPosition (ConstrainedFieldPosition cfpos)
Iterates over field positions in the FormattedValue. This lets you determine the position of specific types of substrings, like a month or a decimal separator. To loop over all field positions:
+ ConstrainedFieldPosition cfpos = new ConstrainedFieldPosition();
+ while (fmtval.nextPosition(cfpos)) {
+ // handle the field position; get information from cfpos
+ }
Android reference for android.icu.text.RelativeDateTimeFormatter.FormattedRelativeDateTime.nextPosition.
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
diff --git a/docs/xml/Android.Icu.Text/UnicodeSetSpanner.xml b/docs/xml/Android.Icu.Text/UnicodeSetSpanner.xml
index 0c3f2add1..9a78ed5d9 100644
--- a/docs/xml/Android.Icu.Text/UnicodeSetSpanner.xml
+++ b/docs/xml/Android.Icu.Text/UnicodeSetSpanner.xml
@@ -1044,23 +1044,11 @@
Returns a trimmed sequence (using CharSequence.
a subsequence
- Returns a trimmed sequence (using CharSequence.subSequence()), that omits matching elements at the start and
- end of the string, using TrimOption.BOTH and SpanCondition.SIMPLE. For example:
- {@code
-
- new UnicodeSet("[ab]").trim("abacatbab")}
-
- ... returns "cat".
-
-
- Java documentation for android.icu.text.UnicodeSetSpanner.trim(java.lang.CharSequence).
-
-
-
- Portions of this page are modifications based on work created and shared by the
- Android Open Source Project
- and used according to terms described in the
- Creative Commons 2.5 Attribution License.
+ public CharSequence trim (CharSequence sequence)
+ Returns a trimmed sequence (using CharSequence.subSequence()), that omits matching elements at the start and end of the string, using TrimOption.BOTH and SpanCondition.SIMPLE. For example:... returns "cat".
+ new UnicodeSet("[ab]").trim("abacatbab")
+ Android reference for android.icu.text.UnicodeSetSpanner.trim.
+ Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
@@ -1097,7 +1085,10 @@
Returns a trimmed sequence (using CharSequence.subSequence()), that omits matching elements at the start or end of the string, using the trimOption and SpanCondition.SIMPLE.
a subsequence
- Returns a trimmed sequence (using CharSequence.subsequence()), that omits matching elements at the start or end of the string, using the trimOption and SpanCondition.SIMPLE. For example:... returns "catbab".
+ public CharSequence trim (CharSequence sequence,
+ UnicodeSetSpanner.TrimOption trimOption)
+ Returns a trimmed sequence (using CharSequence.subSequence()), that omits matching elements at the start or end of the string, using the trimOption and SpanCondition.SIMPLE. For example:... returns "catbab".
+ new UnicodeSet("[ab]").trim("abacatbab", TrimOption.LEADING)
Android reference for android.icu.text.UnicodeSetSpanner.trim.
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
@@ -1138,7 +1129,11 @@
Returns a trimmed sequence (using CharSequence.subSequence()), that omits matching elements at the start or end of the string, depending on the trimOption and spanCondition.
a subsequence
- Returns a trimmed sequence (using CharSequence.subsequence()), that omits matching elements at the start or end of the string, depending on the trimOption and spanCondition. For example:... returns "catbab".
+ public CharSequence trim (CharSequence sequence,
+ UnicodeSetSpanner.TrimOption trimOption,
+ UnicodeSet.SpanCondition spanCondition)
+ Returns a trimmed sequence (using CharSequence.subSequence()), that omits matching elements at the start or end of the string, depending on the trimOption and spanCondition. For example:... returns "catbab".
+ new UnicodeSet("[ab]").trim("abacatbab", TrimOption.LEADING, SpanCondition.SIMPLE)
Android reference for android.icu.text.UnicodeSetSpanner.trim.
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
diff --git a/tools/importer.cs b/tools/importer.cs
index d2c0f080c..b8ee68be2 100644
--- a/tools/importer.cs
+++ b/tools/importer.cs
@@ -575,11 +575,11 @@ static Replacement ReplacementFor(
return placeholder.Name switch
{
"summary" => ChannelValueOrSkip(
- isEnumField ? docs.Paragraphs.FirstOrDefault() : docs.Summary,
+ isEnumField ? docs.Paragraphs.FirstOrDefault()?.Text : docs.Summary,
"summary",
"source_summary_missing"),
"remarks" or "para" => ChannelValueOrSkip(
- docs.Paragraphs.FirstOrDefault(),
+ docs.Paragraphs.FirstOrDefault()?.Text,
"remarks",
"source_remarks_missing"),
"param" => docs.Parameters.TryGetValue(placeholder.Key, out var parameter)
@@ -884,7 +884,7 @@ static string AddSourceDocumentationIfSafe(
if (attributionOnly && !replacedRemarksPlaceholder && docs.Paragraphs.Count > 0)
{
foreach (var paragraph in docs.Paragraphs)
- additions.Add($"{paraIndent}{XmlEscapeDocumentationParagraph(paragraph)}");
+ additions.Add(RenderDocumentationParagraph(paragraph, paraIndent));
}
var sourceLabel = docs.SourceKind == "android" ? "Android" : "Java";
additions.Add(
@@ -959,16 +959,15 @@ static bool HasAugmentedRemarksPlaceholder(LoadedFile file, DocsOwner owner)
static bool HasTruncatedImporterSummary(LoadedFile file, DocsOwner owner)
{
var summary = owner.Docs.Element("summary")?.Value.Trim();
- if (summary is null ||
- !HasTruncatedSummaryEnding(summary))
+ if (summary is null || !HasImporterSourceReference(file, owner))
{
return false;
}
-
- var block = file.DocsBlocks[owner.Order];
- return file.Text[block.Start..block.End].Contains(
- "title=\"Reference documentation\"",
- StringComparison.Ordinal);
+ return HasTruncatedSummaryEnding(summary) ||
+ Regex.IsMatch(
+ summary,
+ @"\b(?:e\.g\.|i\.e\.|vs\.|etc\.|\.\.\.)[\)\]\}]?$",
+ RegexOptions.IgnoreCase | RegexOptions.CultureInvariant);
}
static bool HasIncompleteCodeExampleRemarks(LoadedFile file, DocsOwner owner)
@@ -976,14 +975,25 @@ static bool HasIncompleteCodeExampleRemarks(LoadedFile file, DocsOwner owner)
var block = file.DocsBlocks[owner.Order];
var blockText = file.Text[block.Start..block.End];
return blockText.Contains("title=\"Reference documentation\"", StringComparison.Ordinal) &&
- Regex.IsMatch(
- blockText,
- @"(?:Example code:\s*(?:\{|)|Example code:.*?//|expression:\s*will be true|For example:\s*\.\.\.|For example,\s+to loop\b.*?:\s+[A-Z]|To loop over\b.*?:)",
- RegexOptions.Singleline | RegexOptions.IgnoreCase | RegexOptions.CultureInvariant);
+ (
+ (!Regex.IsMatch(
+ blockText,
+ @"]*\blang=""text/java""",
+ RegexOptions.IgnoreCase | RegexOptions.CultureInvariant) &&
+ Regex.IsMatch(
+ blockText,
+ @"(?:Example code:\s*(?:\{|)|Example code:.*?//|expression:\s*will be true|For example:\s*\.\.\.|For example,\s+to loop\b.*?:\s+[A-Z]|To loop over\b.*?:)",
+ RegexOptions.Singleline | RegexOptions.IgnoreCase | RegexOptions.CultureInvariant)) ||
+ Regex.IsMatch(
+ blockText,
+ @"(?:\{@code|CharSequence\.subsequence\(\)|]*\blang=""text/java""[^>]*>.*?[ \t]+(?:\r?\n))",
+ RegexOptions.Singleline | RegexOptions.IgnoreCase | RegexOptions.CultureInvariant));
}
static bool HasMetadataOnlyRemarks(LoadedFile file, DocsOwner owner)
{
+ if (owner.IsEnumField)
+ return false;
var block = file.DocsBlocks[owner.Order];
return HasMetadataOnlyRemarks(file.Text[block.Start..block.End]);
}
@@ -1030,7 +1040,7 @@ static string ReplaceIncompleteCodeExampleRemarks(
var childIndent = docsIndent + " ";
var paraIndent = childIndent + " ";
var paragraphs = docs.Paragraphs
- .Select(paragraph => $"{paraIndent}{XmlEscapeDocumentationParagraph(paragraph)}")
+ .Select(paragraph => RenderDocumentationParagraph(paragraph, paraIndent))
.ToList();
var sourceLabel = docs.SourceKind == "android" ? "Android" : "Java";
paragraphs.Add(
@@ -1082,6 +1092,14 @@ static bool HasTruncatedSummaryEnding(string summary) =>
summary.EndsWith("vs.", StringComparison.OrdinalIgnoreCase) ||
summary.EndsWith("...", StringComparison.Ordinal);
+ static bool HasImporterSourceReference(LoadedFile file, DocsOwner owner)
+ {
+ var block = file.DocsBlocks[owner.Order];
+ return file.Text[block.Start..block.End].Contains(
+ "title=\"Reference documentation\"",
+ StringComparison.Ordinal);
+ }
+
static string RemoveStaleSourceLinks(
string blockText,
string sourceUrl,
@@ -1157,7 +1175,8 @@ static string AddEnumSummaryMetadata(
}
var sourceParagraphs = docs.Paragraphs
- .Select(CleanSourceText)
+ .Where(paragraph => !paragraph.IsCode)
+ .Select(paragraph => CleanSourceText(paragraph.Text))
.Where(value => IsMeaningfulChannel(value, "remarks"))
.Distinct(StringComparer.Ordinal)
.ToList();
@@ -1287,10 +1306,10 @@ static int ClosingInsertionPoint(string text, int closingTag, string newline)
static string XmlEscape(string value) =>
new XText(CleanSourceText(value)).ToString(SaveOptions.DisableFormatting);
- static string XmlEscapeDocumentationParagraph(string value) =>
- value.Contains('\n')
- ? new XText(value).ToString(SaveOptions.DisableFormatting)
- : XmlEscape(value);
+ static string RenderDocumentationParagraph(SourceParagraph paragraph, string indent) =>
+ paragraph.IsCode
+ ? $"{indent}{new XText(paragraph.Text).ToString(SaveOptions.DisableFormatting)}"
+ : $"{indent}{XmlEscape(paragraph.Text)}";
static string XmlAttributeEscape(string value) =>
SecurityElementEscape(value).Replace("\"", """, StringComparison.Ordinal);
@@ -1315,6 +1334,10 @@ static string CleanSourceText(string value)
RegexOptions.CultureInvariant);
text = Regex.Replace(text, @"\{@(?:link|linkplain|code|literal|value)\s+([^}]+)\}", "$1");
text = Regex.Replace(text, @"\{@\w+(?:\s+[^}]*)?\}", "");
+ text = text.Replace(
+ "CharSequence.subsequence()",
+ "CharSequence.subSequence()",
+ StringComparison.Ordinal);
text = Regex.Replace(text, @"(?Sets the widget title. The exact JNI overload is required.// preserve comments\nwidget.setTitle(title);\n/* done */
",
StringComparison.Ordinal));
Assert(
- codeExamplePage.Members.Single(member => member.Name == "setTitle").Docs?.Paragraphs[1] ==
+ codeExamplePage.Members.Single(member => member.Name == "setTitle").Docs?.Paragraphs[1].Text ==
"// preserve comments\nwidget.setTitle(title);\n/* done */",
"Android code examples preserve line breaks and syntax tokens");
+ var nestedCodeExamplePage = SourcePage.Parse(
+ request,
+ androidHtml.Replace(
+ "Sets the widget title. The exact JNI overload is required.
",
+ "Sets the widget title. {@code widget.setTitle(title);} The exact JNI overload is required.
",
+ StringComparison.Ordinal));
+ var nestedExampleDocs = nestedCodeExamplePage.Members.Single(member => member.Name == "setTitle").Docs!;
+ Assert(
+ nestedExampleDocs.Paragraphs.Count == 2 &&
+ nestedExampleDocs.Paragraphs[0].Text ==
+ "Sets the widget title. The exact JNI overload is required." &&
+ nestedExampleDocs.Paragraphs[1] == new SourceParagraph(
+ "widget.setTitle(title);",
+ IsCode: true),
+ "nested Android code blocks are extracted without consuming prose");
+ Assert(
+ RenderDocumentationParagraph(
+ nestedExampleDocs.Paragraphs[1],
+ " ") == " widget.setTitle(title);",
+ "code examples render as ECMA code blocks");
+ var terminalAbbreviationPage = SourcePage.Parse(
+ request,
+ androidHtml.Replace(
+ "Represents a fixture widget. The widget is used only by local importer tests.",
+ "Uses a value (e.g.) Next sentence.",
+ StringComparison.Ordinal));
+ Assert(
+ terminalAbbreviationPage.TypeDocs?.Summary == "Uses a value (e.g.)",
+ "sentence-ending abbreviations with closing delimiters do not over-merge");
var setTitle = file.Owners.Single(owner => owner.Id.Contains("SetTitle", StringComparison.Ordinal));
var pages = new Dictionary(StringComparer.Ordinal)
@@ -1587,13 +1639,16 @@ static int RunSelfTest(string repositoryRoot)
Assert(
CleanSourceText(@"the user\u2019s \u201cvalue\u201d") == "the user\u2019s \u201cvalue\u201d",
"literal Unicode escape decoding");
+ Assert(
+ CleanSourceText("CharSequence.subsequence()") == "CharSequence.subSequence()",
+ "canonical CharSequence method casing");
Assert(
androidPage.Members.Single(member => member.Name == "Widget").Docs is null,
"boilerplate-only member documentation skip");
Assert(
!favoriteResult.Docs.Paragraphs.Any(
- paragraph => paragraph.Contains("Content and code samples", StringComparison.Ordinal) ||
- paragraph.StartsWith("Last updated ", StringComparison.Ordinal)),
+ paragraph => paragraph.Text.Contains("Content and code samples", StringComparison.Ordinal) ||
+ paragraph.Text.StartsWith("Last updated ", StringComparison.Ordinal)),
"Android footer paragraphs filtered");
var javaRequest = new SourceRequest(
@@ -1604,7 +1659,7 @@ static int RunSelfTest(string repositoryRoot)
Assert(
javaPage.TypeDocs?.Summary == "Represents a sequence of characters." &&
!javaPage.TypeDocs.Paragraphs.Any(
- paragraph => paragraph.Contains("Deprecated", StringComparison.Ordinal)),
+ paragraph => paragraph.Text.Contains("Deprecated", StringComparison.Ordinal)),
"Java deprecated type block excluded");
var length = javaPage.Members.Single(member => member.Name == "length");
Assert(length.ArgumentDescriptors?.Count == 0, "Java no-argument descriptor");
@@ -1612,7 +1667,7 @@ static int RunSelfTest(string repositoryRoot)
Assert(
length.Docs?.Summary == "Returns the length of this string." &&
!length.Docs.Paragraphs.Any(
- paragraph => paragraph.Contains("Deprecated", StringComparison.Ordinal)),
+ paragraph => paragraph.Text.Contains("Deprecated", StringComparison.Ordinal)),
"Java deprecated member block excluded");
var empty = javaPage.Members.Single(member => member.Name == "EMPTY");
Assert(empty.IsField && empty.Docs?.Summary == "An empty fixture string.", "Java field extraction");
@@ -1662,7 +1717,7 @@ static int RunSelfTest(string repositoryRoot)
favoriteText,
file.DocsBlocks[favorite.Order],
favoriteRemarks,
- favoriteResult.Docs.Paragraphs[0],
+ favoriteResult.Docs.Paragraphs[0].Text,
out favoriteText,
out _), "inline remarks replacement");
file.UpdateBlockOffsets(favorite.Order, favoriteText);
@@ -1733,9 +1788,9 @@ static int RunSelfTest(string repositoryRoot)
"a scan handle that can be used to stop the network scan",
"exact Android Returns heading selected");
Assert(
- !favoriteResult.Docs!.Paragraphs[0].Contains(")">", StringComparison.Ordinal) &&
- !favoriteResult.Docs.Paragraphs[0].Contains(")\">", StringComparison.Ordinal) &&
- favoriteResult.Docs.Paragraphs[0].Contains("consume(List)", StringComparison.Ordinal),
+ !favoriteResult.Docs!.Paragraphs[0].Text.Contains(")">", StringComparison.Ordinal) &&
+ !favoriteResult.Docs.Paragraphs[0].Text.Contains(")\">", StringComparison.Ordinal) &&
+ favoriteResult.Docs.Paragraphs[0].Text.Contains("consume(List)", StringComparison.Ordinal),
"quoted generic link stripped without corrupt fragments");
var enumFile = LoadedFile.Load(
@@ -2069,7 +2124,7 @@ static int RunSelfTest(string repositoryRoot)
Directory.Delete(tempDirectory, true);
}
- Console.WriteLine("SELF-TEST PASS: 66 assertions; path-only repository-wide non-API XML exclusion, exact Android/Java method and field matching, parenthesized abbreviation and ellipsis handling, line-preserving code example extraction, augmented and metadata-only remarks repair, truncated-summary repair, repair-only failure reporting, importer metadata remarks repair, standalone annotation skipping, exact Android table headings, deprecated Java block exclusion, exact-structure deprecated enum repair and failure reporting, self-closing remarks expansion, table alignment, quote-aware HTML cleanup, stale-link replacement, partial-write reporting, mismatch and low-value channel skipping, source cleanup, channel extraction, preservation, paragraph remarks, source-link ordering, CRLF atomic writes, and XML parsing.");
+ Console.WriteLine("SELF-TEST PASS: 70 assertions; path-only repository-wide non-API XML exclusion, exact Android/Java method and field matching, parenthesized abbreviation, ellipsis, and closing-delimiter handling, structural nested-code extraction, ECMA code rendering, Javadoc-code cleanup, augmented and metadata-only remarks repair, truncated-summary repair, repair-only failure reporting, importer metadata remarks repair, standalone annotation skipping, exact Android table headings, deprecated Java block exclusion, exact-structure deprecated enum repair and failure reporting, self-closing remarks expansion, table alignment, quote-aware HTML cleanup, stale-link replacement, partial-write reporting, mismatch and low-value channel skipping, source cleanup, channel extraction, preservation, paragraph remarks, source-link ordering, CRLF atomic writes, and XML parsing.");
return 0;
}
@@ -2753,7 +2808,7 @@ static SourcePage ParseAndroid(SourceRequest request, string html)
if (paragraphs.Count == 0)
return null;
return new SourceDocs(
- FirstSentence(paragraphs[0]),
+ FirstSentence(paragraphs[0].Text),
paragraphs,
new Dictionary(StringComparer.Ordinal),
"",
@@ -2796,7 +2851,7 @@ static SourcePage ParseAndroid(SourceRequest request, string html)
if (paragraphs.Count == 0)
return null;
return new SourceDocs(
- FirstSentence(paragraphs[0]),
+ FirstSentence(paragraphs[0].Text),
paragraphs,
parameters,
returns,
@@ -2930,7 +2985,7 @@ static SourcePage ParseJava(SourceRequest request, string html)
if (paragraphs.Count == 0)
return null;
return new SourceDocs(
- FirstSentence(paragraphs[0]),
+ FirstSentence(paragraphs[0].Text),
paragraphs,
new Dictionary(StringComparer.Ordinal),
"",
@@ -2958,7 +3013,7 @@ static SourcePage ParseJava(SourceRequest request, string html)
var returns = ExtractJavaNoteValue(noteBody, "Returns:");
var exceptions = ExtractJavaExceptions(noteBody);
return new SourceDocs(
- FirstSentence(paragraphs[0]),
+ FirstSentence(paragraphs[0].Text),
paragraphs,
parameters,
returns,
@@ -3021,35 +3076,59 @@ static string NoteSection(string notes, string heading)
return match.Success ? match.Groups["body"].Value : "";
}
- static List ExtractParagraphs(string html)
+ static List ExtractParagraphs(string html)
{
- var paragraphs = new List();
- foreach (Match match in Regex.Matches(
+ var paragraphs = new List<(int Position, SourceParagraph Paragraph)>();
+ var stack = new Stack<(string Tag, int ContentStart)>();
+ foreach (Match tag in Regex.Matches(
html,
- @"<(?p|pre|devsite-code)\b[^>]*>(?.*?)\k>",
- RegexOptions.Singleline | RegexOptions.IgnoreCase | RegexOptions.CultureInvariant))
+ @"<(?/)?(?p|pre|devsite-code)\b[^>]*>",
+ RegexOptions.IgnoreCase | RegexOptions.CultureInvariant))
{
- var isCode = !match.Groups["tag"].Value.Equals("p", StringComparison.OrdinalIgnoreCase);
+ var name = tag.Groups["tag"].Value;
+ if (!tag.Groups["close"].Success)
+ {
+ // HTML permits omitted ; a nested paragraph starts a new block.
+ if (name.Equals("p", StringComparison.OrdinalIgnoreCase) &&
+ stack.Count > 0 &&
+ stack.Peek().Tag.Equals("p", StringComparison.OrdinalIgnoreCase))
+ {
+ stack.Pop();
+ }
+ stack.Push((name, tag.Index + tag.Length));
+ continue;
+ }
+
+ if (stack.Count == 0)
+ continue;
+ var open = stack.Pop();
+ if (!open.Tag.Equals(name, StringComparison.OrdinalIgnoreCase))
+ continue;
+
+ var isCode = name.Equals("pre", StringComparison.OrdinalIgnoreCase) ||
+ name.Equals("devsite-code", StringComparison.OrdinalIgnoreCase);
var value = isCode
- ? HtmlCodeText(match.Groups["body"].Value)
- : CleanSourceParagraph(HtmlText(match.Groups["body"].Value));
+ ? HtmlCodeText(html[open.ContentStart..tag.Index])
+ : CleanSourceParagraph(HtmlText(html[open.ContentStart..tag.Index]));
if (value.Length == 0)
continue;
-
- if (!isCode)
+ if (isCode)
{
- if (IsMeaningfulChannel(value, "remarks"))
- paragraphs.Add(value);
+ paragraphs.Add((open.ContentStart, new SourceParagraph(value, IsCode: true)));
}
- else if (paragraphs.Count > 0)
+ else if (IsMeaningfulChannel(value, "remarks"))
{
- paragraphs.Add(value);
+ paragraphs.Add((open.ContentStart, new SourceParagraph(value, IsCode: false)));
}
}
- return paragraphs.Distinct(StringComparer.Ordinal).ToList();
+ return paragraphs
+ .OrderBy(paragraph => paragraph.Position)
+ .Select(paragraph => paragraph.Paragraph)
+ .Distinct()
+ .ToList();
}
- static List ExtractBlocks(string html) =>
+ static List ExtractBlocks(string html) =>
Regex.Matches(
html,
@"[^>]*)>(?.*?)
",
@@ -3065,9 +3144,9 @@ static List ExtractBlocks(string html) =>
return classTokens.Contains("block", StringComparer.Ordinal) &&
!classTokens.Contains("deprecation-block", StringComparer.Ordinal);
})
- .Select(match => HtmlText(match.Groups["body"].Value))
- .Where(value => value.Length > 0)
- .Distinct(StringComparer.Ordinal)
+ .Select(match => new SourceParagraph(HtmlText(match.Groups["body"].Value), IsCode: false))
+ .Where(paragraph => paragraph.Text.Length > 0)
+ .Distinct()
.ToList();
static Dictionary ParseAttributes(string attributes)
@@ -3097,7 +3176,7 @@ static string HtmlText(string html, bool includeCode = false)
@"?(?:p|div|li|tr|td|th|dd|dt|br|ul|ol|blockquote)\b[^>]*>",
" ",
RegexOptions.IgnoreCase | RegexOptions.CultureInvariant);
- return CleanSourceText(StripHtmlTags(withBreaks));
+ return CleanSourceText(StripHtmlTags(withBreaks, addWhitespace: false));
}
static string HtmlCodeText(string html)
@@ -3108,9 +3187,17 @@ static string HtmlCodeText(string html)
"",
RegexOptions.Singleline | RegexOptions.IgnoreCase | RegexOptions.CultureInvariant);
var code = StripHtmlTags(withoutIgnored, addWhitespace: false);
- return WebUtility.HtmlDecode(code)
+ code = WebUtility.HtmlDecode(code)
.Replace("\r\n", "\n", StringComparison.Ordinal)
- .Replace('\r', '\n')
+ .Replace('\r', '\n');
+ code = Regex.Replace(
+ code,
+ @"\{@code\s+(?.*?)\}",
+ match => match.Groups["value"].Value,
+ RegexOptions.Singleline | RegexOptions.CultureInvariant);
+ return string.Join(
+ "\n",
+ code.Split('\n').Select(line => line.TrimEnd()))
.Trim('\n');
}
@@ -3159,18 +3246,29 @@ static string FirstSentence(string text)
for (var index = 0; index < text.Length; index++)
{
if (text[index] is not ('.' or '!' or '?') ||
- (index + 1 < text.Length && !char.IsWhiteSpace(text[index + 1])) ||
+ !IsSentenceBoundary(text, index) ||
(text[index] == '.' && (IsAbbreviation(text, index) || IsEllipsis(text, index))))
{
continue;
}
- return text[..(index + 1)];
+ var end = index + 1;
+ while (end < text.Length && text[end] is ')' or ']' or '}')
+ end++;
+ return text[..end];
}
return text;
}
+ static bool IsSentenceBoundary(string text, int punctuationIndex)
+ {
+ var next = punctuationIndex + 1;
+ while (next < text.Length && text[next] is ')' or ']' or '}')
+ next++;
+ return next == text.Length || char.IsWhiteSpace(text[next]);
+ }
+
static bool IsEllipsis(string text, int periodIndex) =>
periodIndex >= 2 &&
text[periodIndex - 1] == '.' &&
@@ -3178,11 +3276,13 @@ static bool IsEllipsis(string text, int periodIndex) =>
static bool IsAbbreviation(string text, int periodIndex)
{
+ if (HasClosingDelimiterBoundary(text, periodIndex))
+ return false;
var tokenStart = periodIndex;
while (tokenStart > 0 && !char.IsWhiteSpace(text[tokenStart - 1]))
tokenStart--;
var token = text[tokenStart..(periodIndex + 1)]
- .TrimStart('(', '[', '{', '"', '\'');
+ .Trim('(', ')', '[', ']', '{', '}', '"', '\'');
return token.Equals("e.g.", StringComparison.OrdinalIgnoreCase) ||
token.Equals("i.e.", StringComparison.OrdinalIgnoreCase) ||
token.Equals("vs.", StringComparison.OrdinalIgnoreCase) ||
@@ -3192,6 +3292,19 @@ static bool IsAbbreviation(string text, int periodIndex)
@"^(?:[A-Za-z]\.){2,}$",
RegexOptions.CultureInvariant);
}
+
+ static bool HasClosingDelimiterBoundary(string text, int periodIndex)
+ {
+ var next = periodIndex + 1;
+ var hasClosingDelimiter = false;
+ while (next < text.Length && text[next] is ')' or ']' or '}')
+ {
+ hasClosingDelimiter = true;
+ next++;
+ }
+ return hasClosingDelimiter &&
+ (next == text.Length || char.IsWhiteSpace(text[next]));
+ }
}
sealed record SourceMember(
@@ -3204,9 +3317,11 @@ sealed record SourceMember(
public string Url => Docs?.SourceUrl ?? "";
}
+ sealed record SourceParagraph(string Text, bool IsCode);
+
sealed record SourceDocs(
string Summary,
- List Paragraphs,
+ List Paragraphs,
Dictionary Parameters,
string Returns,
Dictionary Exceptions,
From d5acccabfa333bbc3e64e3645db23453caebe9f1 Mon Sep 17 00:00:00 2001
From: Jonathan Peppers
Date: Thu, 20 Aug 2026 16:02:15 -0500
Subject: [PATCH 9/9] Preserve ordered Android documentation blocks
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 090d0776-3020-428e-a4b0-e062232ad5ed
---
tools/importer.cs | 74 +++++++++++++++++++++++++++++++++++++----------
1 file changed, 59 insertions(+), 15 deletions(-)
diff --git a/tools/importer.cs b/tools/importer.cs
index b8ee68be2..d12b7b359 100644
--- a/tools/importer.cs
+++ b/tools/importer.cs
@@ -1517,18 +1517,29 @@ static int RunSelfTest(string repositoryRoot)
StringComparison.Ordinal));
var nestedExampleDocs = nestedCodeExamplePage.Members.Single(member => member.Name == "setTitle").Docs!;
Assert(
- nestedExampleDocs.Paragraphs.Count == 2 &&
+ nestedExampleDocs.Paragraphs.Count == 3 &&
nestedExampleDocs.Paragraphs[0].Text ==
- "Sets the widget title. The exact JNI overload is required." &&
+ "Sets the widget title." &&
nestedExampleDocs.Paragraphs[1] == new SourceParagraph(
"widget.setTitle(title);",
- IsCode: true),
- "nested Android code blocks are extracted without consuming prose");
+ IsCode: true) &&
+ nestedExampleDocs.Paragraphs[2].Text == "The exact JNI overload is required.",
+ "nested Android code blocks preserve surrounding prose order");
Assert(
RenderDocumentationParagraph(
nestedExampleDocs.Paragraphs[1],
" ") == " widget.setTitle(title);",
"code examples render as ECMA code blocks");
+ var signaturePage = SourcePage.Parse(
+ request,
+ androidHtml.Replace(
+ "Sets the widget title. The exact JNI overload is required.
",
+ "public int setTitle (CharSequence title)
Sets the widget title. The exact JNI overload is required.
",
+ StringComparison.Ordinal));
+ Assert(
+ signaturePage.Members.Single(member => member.Name == "setTitle").Docs?.Summary ==
+ "Sets the widget title.",
+ "Android API signatures are excluded from prose extraction");
var terminalAbbreviationPage = SourcePage.Parse(
request,
androidHtml.Replace(
@@ -2124,7 +2135,7 @@ static int RunSelfTest(string repositoryRoot)
Directory.Delete(tempDirectory, true);
}
- Console.WriteLine("SELF-TEST PASS: 70 assertions; path-only repository-wide non-API XML exclusion, exact Android/Java method and field matching, parenthesized abbreviation, ellipsis, and closing-delimiter handling, structural nested-code extraction, ECMA code rendering, Javadoc-code cleanup, augmented and metadata-only remarks repair, truncated-summary repair, repair-only failure reporting, importer metadata remarks repair, standalone annotation skipping, exact Android table headings, deprecated Java block exclusion, exact-structure deprecated enum repair and failure reporting, self-closing remarks expansion, table alignment, quote-aware HTML cleanup, stale-link replacement, partial-write reporting, mismatch and low-value channel skipping, source cleanup, channel extraction, preservation, paragraph remarks, source-link ordering, CRLF atomic writes, and XML parsing.");
+ Console.WriteLine("SELF-TEST PASS: 71 assertions; path-only repository-wide non-API XML exclusion, exact Android/Java method and field matching, parenthesized abbreviation, ellipsis, and closing-delimiter handling, Android signature exclusion, structural nested-code extraction, ECMA code rendering, Javadoc-code cleanup, augmented and metadata-only remarks repair, truncated-summary repair, repair-only failure reporting, importer metadata remarks repair, standalone annotation skipping, exact Android table headings, deprecated Java block exclusion, exact-structure deprecated enum repair and failure reporting, self-closing remarks expansion, table alignment, quote-aware HTML cleanup, stale-link replacement, partial-write reporting, mismatch and low-value channel skipping, source cleanup, channel extraction, preservation, paragraph remarks, source-link ordering, CRLF atomic writes, and XML parsing.");
return 0;
}
@@ -2847,6 +2858,11 @@ static SourcePage ParseAndroid(SourceRequest request, string html)
@"",
" ",
RegexOptions.Singleline | RegexOptions.IgnoreCase | RegexOptions.CultureInvariant);
+ prose = Regex.Replace(
+ prose,
+ @"]*\bclass=[""'][^""']*\bapi-signature\b[^""']*[""'])[^>]*>.*?
",
+ " ",
+ RegexOptions.Singleline | RegexOptions.IgnoreCase | RegexOptions.CultureInvariant);
var paragraphs = ExtractParagraphs(prose);
if (paragraphs.Count == 0)
return null;
@@ -3079,7 +3095,8 @@ static string NoteSection(string notes, string heading)
static List ExtractParagraphs(string html)
{
var paragraphs = new List<(int Position, SourceParagraph Paragraph)>();
- var stack = new Stack<(string Tag, int ContentStart)>();
+ var codeRanges = new List<(int Start, int End, SourceParagraph Paragraph)>();
+ var stack = new Stack<(string Tag, int TagStart, int ContentStart)>();
foreach (Match tag in Regex.Matches(
html,
@"<(?/)?(?p|pre|devsite-code)\b[^>]*>",
@@ -3095,7 +3112,7 @@ static List ExtractParagraphs(string html)
{
stack.Pop();
}
- stack.Push((name, tag.Index + tag.Length));
+ stack.Push((name, tag.Index, tag.Index + tag.Length));
continue;
}
@@ -3107,20 +3124,37 @@ static List ExtractParagraphs(string html)
var isCode = name.Equals("pre", StringComparison.OrdinalIgnoreCase) ||
name.Equals("devsite-code", StringComparison.OrdinalIgnoreCase);
- var value = isCode
- ? HtmlCodeText(html[open.ContentStart..tag.Index])
- : CleanSourceParagraph(HtmlText(html[open.ContentStart..tag.Index]));
- if (value.Length == 0)
- continue;
if (isCode)
{
- paragraphs.Add((open.ContentStart, new SourceParagraph(value, IsCode: true)));
+ var value = HtmlCodeText(html[open.ContentStart..tag.Index]);
+ if (value.Length > 0)
+ codeRanges.Add((open.TagStart, tag.Index + tag.Length, new SourceParagraph(value, IsCode: true)));
}
- else if (IsMeaningfulChannel(value, "remarks"))
+ else
{
- paragraphs.Add((open.ContentStart, new SourceParagraph(value, IsCode: false)));
+ var nestedCode = codeRanges
+ .Where(code => code.Start >= open.ContentStart && code.End <= tag.Index)
+ .OrderBy(code => code.Start)
+ .ToList();
+ var textStart = open.ContentStart;
+ foreach (var code in nestedCode)
+ {
+ if (code.Start < textStart)
+ continue;
+ AddSourceTextParagraph(html[textStart..code.Start], textStart, paragraphs);
+ paragraphs.Add((code.Start, code.Paragraph));
+ textStart = code.End;
+ }
+ if (textStart <= tag.Index)
+ AddSourceTextParagraph(html[textStart..tag.Index], textStart, paragraphs);
}
}
+ foreach (var code in codeRanges.Where(code =>
+ !paragraphs.Any(paragraph => paragraph.Position == code.Start &&
+ paragraph.Paragraph == code.Paragraph)))
+ {
+ paragraphs.Add((code.Start, code.Paragraph));
+ }
return paragraphs
.OrderBy(paragraph => paragraph.Position)
.Select(paragraph => paragraph.Paragraph)
@@ -3128,6 +3162,16 @@ static List ExtractParagraphs(string html)
.ToList();
}
+ static void AddSourceTextParagraph(
+ string html,
+ int position,
+ List<(int Position, SourceParagraph Paragraph)> paragraphs)
+ {
+ var value = CleanSourceParagraph(HtmlText(html));
+ if (IsMeaningfulChannel(value, "remarks"))
+ paragraphs.Add((position, new SourceParagraph(value, IsCode: false)));
+ }
+
static List ExtractBlocks(string html) =>
Regex.Matches(
html,