/
MessageFormat.xml
1324 lines (1309 loc) · 88.7 KB
/
MessageFormat.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<Type Name="MessageFormat" FullName="Java.Text.MessageFormat">
<TypeSignature Language="C#" Value="public class MessageFormat : Java.Text._Format" />
<TypeSignature Language="ILAsm" Value=".class public auto ansi beforefieldinit MessageFormat extends Java.Text._Format" />
<TypeSignature Language="DocId" Value="T:Java.Text.MessageFormat" />
<TypeSignature Language="F#" Value="type MessageFormat = class
 inherit _Format" />
<AssemblyInfo>
<AssemblyName>Mono.Android</AssemblyName>
<AssemblyVersion>0.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Base>
<BaseTypeName>Java.Text._Format</BaseTypeName>
</Base>
<Interfaces />
<Attributes>
<Attribute>
<AttributeName Language="C#">[Android.Runtime.Register("java/text/MessageFormat", DoNotGenerateAcw=true)]</AttributeName>
<AttributeName Language="F#">[<Android.Runtime.Register("java/text/MessageFormat", DoNotGenerateAcw=true)>]</AttributeName>
</Attribute>
</Attributes>
<Docs since="1">
<summary>
<c>MessageFormat</c> provides a means to produce concatenated
messages in a language-neutral way.</summary>
<remarks>
<para>
<c>MessageFormat</c> provides a means to produce concatenated
messages in a language-neutral way. Use this to construct messages
displayed for end users.</para>
<para>
<c>MessageFormat</c> takes a set of objects, formats them, then
inserts the formatted strings into the pattern at the appropriate places.</para>
<para><strong>Note:</strong>
<c>MessageFormat</c> differs from the other <c>Format</c>
classes in that you create a <c>MessageFormat</c> object with one
of its constructors (not with a <c>getInstance</c> style factory
method). The factory methods aren't necessary because <c>MessageFormat</c>
itself doesn't implement locale specific behavior. Any locale specific
behavior is defined by the pattern that you provide as well as the
subformats used for inserted arguments.
<h2>"patterns">Patterns and Their Interpretation</h2>
<c>MessageFormat</c> uses patterns of the following form:
<blockquote></para>
<code lang="text/java"><i>MessageFormatPattern:</i>
<i>String</i>
<i>MessageFormatPattern</i> <i>FormatElement</i> <i>String</i>
<i>FormatElement:</i>
{ <i>ArgumentIndex</i> }
{ <i>ArgumentIndex</i> , <i>FormatType</i> }
{ <i>ArgumentIndex</i> , <i>FormatType</i> , <i>FormatStyle</i> }
<i>FormatType: one of </i>
number date time choice
<i>FormatStyle:</i>
short
medium
long
full
integer
currency
percent
<i>SubformatPattern</i>
</code>
<para></blockquote></para>
<para>Within a <i>String</i>, a pair of single quotes can be used to
quote any arbitrary characters except single quotes. For example,
pattern string <c>"'{0}'"</c> represents string
<c>"{0}"</c>, not a <i>FormatElement</i>. A single quote itself
must be represented by doubled single quotes <c>''</c> throughout a
<i>String</i>. For example, pattern string <c>"'{''}'"</c> is
interpreted as a sequence of <c>'{</c> (start of quoting and a
left curly brace), <c>''</c> (a single quote), and
<c>}'</c> (a right curly brace and end of quoting),
<em>not</em> <c>'{'</c> and <c>'}'</c> (quoted left and
right curly braces): representing string <c>"{'}"</c>,
<em>not</em> <c>"{}"</c>.</para>
<para>A <i>SubformatPattern</i> is interpreted by its corresponding
subformat, and subformat-dependent pattern rules apply. For example,
pattern string <c>"{1,number,<u>$'#',##</u>}"</c>
(<i>SubformatPattern</i> with underline) will produce a number format
with the pound-sign quoted, with a result such as: <c>"$#31,45"</c>. Refer to each <c>Format</c> subclass documentation for
details.</para>
<para>Any unmatched quote is treated as closed at the end of the given
pattern. For example, pattern string <c>"'{0</c>"} is treated as
pattern <c>"'{0</c>'"}.</para>
<para>Any curly braces within an unquoted pattern must be balanced. For
example, <c>"ab {0} de"</c> and <c>"ab '}' de"</c> are
valid patterns, but <c>"ab {0'}' de"</c>, <c>"ab } de"</c>
and <c>"''{''"</c> are not.
<dl><dt><b>Warning:</b><dd>The rules for using quotes within message
format patterns unfortunately have shown to be somewhat confusing.
In particular, it isn't always obvious to localizers whether single
quotes need to be doubled or not. Make sure to inform localizers about
the rules, and tell them (for example, by using comments in resource
bundle source files) which strings will be processed by <c>MessageFormat</c>.
Note that localizers may need to use single quotes in translated
strings where the original version doesn't have them.
</dl></para>
<para>The <i>ArgumentIndex</i> value is a non-negative integer written
using the digits <c>'0'</c> through <c>'9'</c>, and represents an index into the
<c>arguments</c> array passed to the <c>format</c> methods
or the result array returned by the <c>parse</c> methods.</para>
<para>The <i>FormatType</i> and <i>FormatStyle</i> values are used to create
a <c>Format</c> instance for the format element. The following
table shows how the values map to <c>Format</c> instances. Combinations not
shown in the table are illegal. A <i>SubformatPattern</i> must
be a valid pattern string for the <c>Format</c> subclass used.
<table class="plain">
<caption style="display:none">Shows how FormatType and FormatStyle values map to Format instances</caption>
<thead>
<tr>
<th scope="col" class="TableHeadingColor">FormatType
<th scope="col" class="TableHeadingColor">FormatStyle
<th scope="col" class="TableHeadingColor">Subformat Created
</thead>
<tbody>
<tr>
<th scope="row" style="text-weight: normal"><i>(none)</i><th scope="row" style="text-weight: normal"><i>(none)</i><td><c>null</c><tr>
<th scope="row" style="text-weight: normal" rowspan=5><c>number</c><th scope="row" style="text-weight: normal"><i>(none)</i><td><c>NumberFormat#getInstance(Locale) NumberFormat.getInstance</c><c>(getLocale())</c><tr>
<th scope="row" style="text-weight: normal"><c>integer</c><td><c>NumberFormat#getIntegerInstance(Locale) NumberFormat.getIntegerInstance</c><c>(getLocale())</c><tr>
<th scope="row" style="text-weight: normal"><c>currency</c><td><c>NumberFormat#getCurrencyInstance(Locale) NumberFormat.getCurrencyInstance</c><c>(getLocale())</c><tr>
<th scope="row" style="text-weight: normal"><c>percent</c><td><c>NumberFormat#getPercentInstance(Locale) NumberFormat.getPercentInstance</c><c>(getLocale())</c><tr>
<th scope="row" style="text-weight: normal"><i>SubformatPattern</i><td><c>new</c><c>DecimalFormat#DecimalFormat(String,DecimalFormatSymbols) DecimalFormat</c><c>(subformatPattern,</c><c>DecimalFormatSymbols#getInstance(Locale) DecimalFormatSymbols.getInstance</c><c>(getLocale()))</c><tr>
<th scope="row" style="text-weight: normal" rowspan=6><c>date</c><th scope="row" style="text-weight: normal"><i>(none)</i><td><c>DateFormat#getDateInstance(int,Locale) DateFormat.getDateInstance</c><c>(</c><c>DateFormat#DEFAULT</c><c>, getLocale())</c><tr>
<th scope="row" style="text-weight: normal"><c>short</c><td><c>DateFormat#getDateInstance(int,Locale) DateFormat.getDateInstance</c><c>(</c><c>DateFormat#SHORT</c><c>, getLocale())</c><tr>
<th scope="row" style="text-weight: normal"><c>medium</c><td><c>DateFormat#getDateInstance(int,Locale) DateFormat.getDateInstance</c><c>(</c><c>DateFormat#DEFAULT</c><c>, getLocale())</c><tr>
<th scope="row" style="text-weight: normal"><c>long</c><td><c>DateFormat#getDateInstance(int,Locale) DateFormat.getDateInstance</c><c>(</c><c>DateFormat#LONG</c><c>, getLocale())</c><tr>
<th scope="row" style="text-weight: normal"><c>full</c><td><c>DateFormat#getDateInstance(int,Locale) DateFormat.getDateInstance</c><c>(</c><c>DateFormat#FULL</c><c>, getLocale())</c><tr>
<th scope="row" style="text-weight: normal"><i>SubformatPattern</i><td><c>new</c><c>SimpleDateFormat#SimpleDateFormat(String,Locale) SimpleDateFormat</c><c>(subformatPattern, getLocale())</c><tr>
<th scope="row" style="text-weight: normal" rowspan=6><c>time</c><th scope="row" style="text-weight: normal"><i>(none)</i><td><c>DateFormat#getTimeInstance(int,Locale) DateFormat.getTimeInstance</c><c>(</c><c>DateFormat#DEFAULT</c><c>, getLocale())</c><tr>
<th scope="row" style="text-weight: normal"><c>short</c><td><c>DateFormat#getTimeInstance(int,Locale) DateFormat.getTimeInstance</c><c>(</c><c>DateFormat#SHORT</c><c>, getLocale())</c><tr>
<th scope="row" style="text-weight: normal"><c>medium</c><td><c>DateFormat#getTimeInstance(int,Locale) DateFormat.getTimeInstance</c><c>(</c><c>DateFormat#DEFAULT</c><c>, getLocale())</c><tr>
<th scope="row" style="text-weight: normal"><c>long</c><td><c>DateFormat#getTimeInstance(int,Locale) DateFormat.getTimeInstance</c><c>(</c><c>DateFormat#LONG</c><c>, getLocale())</c><tr>
<th scope="row" style="text-weight: normal"><c>full</c><td><c>DateFormat#getTimeInstance(int,Locale) DateFormat.getTimeInstance</c><c>(</c><c>DateFormat#FULL</c><c>, getLocale())</c><tr>
<th scope="row" style="text-weight: normal"><i>SubformatPattern</i><td><c>new</c><c>SimpleDateFormat#SimpleDateFormat(String,Locale) SimpleDateFormat</c><c>(subformatPattern, getLocale())</c><tr>
<th scope="row" style="text-weight: normal"><c>choice</c><th scope="row" style="text-weight: normal"><i>SubformatPattern</i><td><c>new</c><c>ChoiceFormat#ChoiceFormat(String) ChoiceFormat</c><c>(subformatPattern)</c></tbody>
</table>
<h3>Usage Information</h3></para>
<para>Here are some examples of usage.
In real internationalized programs, the message format pattern and other
static strings will, of course, be obtained from resource bundles.
Other parameters will be dynamically determined at runtime.</para>
<para>The first example uses the static method <c>MessageFormat.format</c>,
which internally creates a <c>MessageFormat</c> for one-time use:
<blockquote></para>
<code lang="text/java">int planet = 7;
String event = "a disturbance in the Force";
String result = MessageFormat.format(
"At {1,time} on {1,date}, there was {2} on planet {0,number,integer}.",
planet, new Date(), event);
</code>
<para></blockquote>
The output is:
<blockquote></para>
<code lang="text/java">At 12:30 PM on Jul 3, 2053, there was a disturbance in the Force on planet 7.
</code>
<para></blockquote></para>
<para>The following example creates a <c>MessageFormat</c> instance that
can be used repeatedly:
<blockquote></para>
<code lang="text/java">int fileCount = 1273;
String diskName = "MyDisk";
Object[] testArgs = {new Long(fileCount), diskName};
MessageFormat form = new MessageFormat(
"The disk \"{1}\" contains {0} file(s).");
System.out.println(form.format(testArgs));
</code>
<para></blockquote>
The output with different values for <c>fileCount</c>:
<blockquote></para>
<code lang="text/java">The disk "MyDisk" contains 0 file(s).
The disk "MyDisk" contains 1 file(s).
The disk "MyDisk" contains 1,273 file(s).
</code>
<para></blockquote></para>
<para>For more sophisticated patterns, you can use a <c>ChoiceFormat</c>
to produce correct forms for singular and plural:
<blockquote></para>
<code lang="text/java">MessageFormat form = new MessageFormat("The disk \"{1}\" contains {0}.");
double[] filelimits = {0,1,2};
String[] filepart = {"no files","one file","{0,number} files"};
ChoiceFormat fileform = new ChoiceFormat(filelimits, filepart);
form.setFormatByArgumentIndex(0, fileform);
int fileCount = 1273;
String diskName = "MyDisk";
Object[] testArgs = {new Long(fileCount), diskName};
System.out.println(form.format(testArgs));
</code>
<para></blockquote>
The output with different values for <c>fileCount</c>:
<blockquote></para>
<code lang="text/java">The disk "MyDisk" contains no files.
The disk "MyDisk" contains one file.
The disk "MyDisk" contains 1,273 files.
</code>
<para></blockquote></para>
<para>You can create the <c>ChoiceFormat</c> programmatically, as in the
above example, or by using a pattern. See <c>ChoiceFormat</c>
for more information.
<blockquote></para>
<code lang="text/java">{@code
form.applyPattern(
"There {0,choice,0#are no files|1#is one file|1<are {0,number,integer} files}.");
}</code>
<para></blockquote></para>
<para><strong>Note:</strong> As we see above, the string produced
by a <c>ChoiceFormat</c> in <c>MessageFormat</c> is treated as special;
occurrences of '{' are used to indicate subformats, and cause recursion.
If you create both a <c>MessageFormat</c> and <c>ChoiceFormat</c>
programmatically (instead of using the string patterns), then be careful not to
produce a format that recurses on itself, which will cause an infinite loop.</para>
<para>When a single argument is parsed more than once in the string, the last match
will be the final result of the parsing. For example,
<blockquote></para>
<code lang="text/java">MessageFormat mf = new MessageFormat("{0,number,#.##}, {0,number,#.#}");
Object[] objs = {new Double(3.1415)};
String result = mf.format( objs );
// result now equals "3.14, 3.1"
objs = null;
objs = mf.parse(result, new ParsePosition(0));
// objs now equals {new Double(3.1)}
</code>
<para></blockquote></para>
<para>Likewise, parsing with a <c>MessageFormat</c> object using patterns containing
multiple occurrences of the same argument would return the last match. For
example,
<blockquote></para>
<code lang="text/java">MessageFormat mf = new MessageFormat("{0}, {0}, {0}");
String forParsing = "x, y, z";
Object[] objs = mf.parse(forParsing, new ParsePosition(0));
// result now equals {new String("z")}
</code>
<para></blockquote>
<h3>"synchronization">Synchronization</h3></para>
<para>Message formats are not synchronized.
It is recommended to create separate format instances for each thread.
If multiple threads access a format concurrently, it must be synchronized
externally.</para>
<para>Added in 1.1.</para>
<para>
<format type="text/html">
<a href="https://developer.android.com/reference/java/text/MessageFormat" title="Reference documentation">Java documentation for <code>java.text.MessageFormat</code>.</a>
</format>
</para>
<para>
Portions of this page are modifications based on work created and shared by the
<format type="text/html"><a href="https://developers.google.com/terms/site-policies" title="Android Open Source Project">Android Open Source Project</a></format>
and used according to terms described in the
<format type="text/html"><a href="https://creativecommons.org/licenses/by/2.5/" title="Creative Commons 2.5 Attribution License">Creative Commons 2.5 Attribution License.</a></format></para>
</remarks>
<since version="Added in API level 1" />
</Docs>
<Members>
<Member MemberName=".ctor">
<MemberSignature Language="C#" Value="public MessageFormat (string? pattern);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig specialname rtspecialname instance void .ctor(string pattern) cil managed" />
<MemberSignature Language="DocId" Value="M:Java.Text.MessageFormat.#ctor(System.String)" />
<MemberSignature Language="F#" Value="new Java.Text.MessageFormat : string -> Java.Text.MessageFormat" Usage="new Java.Text.MessageFormat pattern" />
<MemberType>Constructor</MemberType>
<AssemblyInfo>
<AssemblyName>Mono.Android</AssemblyName>
<AssemblyVersion>0.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute>
<AttributeName Language="C#">[Android.Runtime.Register(".ctor", "(Ljava/lang/String;)V", "")]</AttributeName>
<AttributeName Language="F#">[<Android.Runtime.Register(".ctor", "(Ljava/lang/String;)V", "")>]</AttributeName>
</Attribute>
</Attributes>
<Parameters>
<Parameter Name="pattern" Type="System.String" />
</Parameters>
<Docs>
<param name="pattern">the pattern for this message format</param>
<summary>Constructs a MessageFormat for the default
<c>java.util.Locale.Category#FORMAT FORMAT</c> locale and the
specified pattern.</summary>
<remarks>
<para>Constructs a MessageFormat for the default
<c>java.util.Locale.Category#FORMAT FORMAT</c> locale and the
specified pattern.
The constructor first sets the locale, then parses the pattern and
creates a list of subformats for the format elements contained in it.
Patterns and their interpretation are specified in the
class description.</para>
<para>
<format type="text/html">
<a href="https://developer.android.com/reference/java/text/MessageFormat#MessageFormat(java.lang.String)" title="Reference documentation">Java documentation for <code>java.text.MessageFormat.MessageFormat(java.lang.String)</code>.</a>
</format>
</para>
<para>
Portions of this page are modifications based on work created and shared by the
<format type="text/html"><a href="https://developers.google.com/terms/site-policies" title="Android Open Source Project">Android Open Source Project</a></format>
and used according to terms described in the
<format type="text/html"><a href="https://creativecommons.org/licenses/by/2.5/" title="Creative Commons 2.5 Attribution License">Creative Commons 2.5 Attribution License.</a></format></para>
</remarks>
<since version="Added in API level 1" />
<exception cref="T:Java.Lang.IllegalArgumentException">if the pattern cannot be parsed.
</exception>
</Docs>
</Member>
<Member MemberName=".ctor">
<MemberSignature Language="C#" Value="protected MessageFormat (IntPtr javaReference, Android.Runtime.JniHandleOwnership transfer);" />
<MemberSignature Language="ILAsm" Value=".method familyhidebysig specialname rtspecialname instance void .ctor(native int javaReference, valuetype Android.Runtime.JniHandleOwnership transfer) cil managed" />
<MemberSignature Language="DocId" Value="M:Java.Text.MessageFormat.#ctor(System.IntPtr,Android.Runtime.JniHandleOwnership)" />
<MemberSignature Language="F#" Value="new Java.Text.MessageFormat : nativeint * Android.Runtime.JniHandleOwnership -> Java.Text.MessageFormat" Usage="new Java.Text.MessageFormat (javaReference, transfer)" />
<MemberType>Constructor</MemberType>
<AssemblyInfo>
<AssemblyName>Mono.Android</AssemblyName>
<AssemblyVersion>0.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Parameters>
<Parameter Name="javaReference" Type="System.IntPtr" />
<Parameter Name="transfer" Type="Android.Runtime.JniHandleOwnership" />
</Parameters>
<Docs>
<param name="javaReference">A <see cref="T:System.IntPtr" />containing a Java Native Interface (JNI) object reference.</param>
<param name="transfer">A <see cref="T:Android.Runtime.JniHandleOwnership" />indicating how to handle <paramref name="javaReference" /></param>
<summary>A constructor used when creating managed representations of JNI objects; called by the runtime.</summary>
<remarks>
<para>Portions of this page are modifications based on work created and shared by the <format type="text/html"><a href="https://developers.google.com/terms/site-policies" title="Android Open Source Project">Android Open Source Project</a></format> and used according to terms described in the <format type="text/html"><a href="https://creativecommons.org/licenses/by/2.5/" title="Creative Commons 2.5 Attribution License">Creative Commons 2.5 Attribution License.</a></format></para>
</remarks>
</Docs>
</Member>
<Member MemberName=".ctor">
<MemberSignature Language="C#" Value="public MessageFormat (string? pattern, Java.Util.Locale? locale);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig specialname rtspecialname instance void .ctor(string pattern, class Java.Util.Locale locale) cil managed" />
<MemberSignature Language="DocId" Value="M:Java.Text.MessageFormat.#ctor(System.String,Java.Util.Locale)" />
<MemberSignature Language="F#" Value="new Java.Text.MessageFormat : string * Java.Util.Locale -> Java.Text.MessageFormat" Usage="new Java.Text.MessageFormat (pattern, locale)" />
<MemberType>Constructor</MemberType>
<AssemblyInfo>
<AssemblyName>Mono.Android</AssemblyName>
<AssemblyVersion>0.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute>
<AttributeName Language="C#">[Android.Runtime.Register(".ctor", "(Ljava/lang/String;Ljava/util/Locale;)V", "")]</AttributeName>
<AttributeName Language="F#">[<Android.Runtime.Register(".ctor", "(Ljava/lang/String;Ljava/util/Locale;)V", "")>]</AttributeName>
</Attribute>
</Attributes>
<Parameters>
<Parameter Name="pattern" Type="System.String" />
<Parameter Name="locale" Type="Java.Util.Locale" />
</Parameters>
<Docs>
<param name="pattern">the pattern for this message format</param>
<param name="locale">the locale for this message format</param>
<summary>Constructs a MessageFormat for the specified locale and
pattern.</summary>
<remarks>
<para>Constructs a MessageFormat for the specified locale and
pattern.
The constructor first sets the locale, then parses the pattern and
creates a list of subformats for the format elements contained in it.
Patterns and their interpretation are specified in the
class description.</para>
<para>Added in 1.4.</para>
<para>
<format type="text/html">
<a href="https://developer.android.com/reference/java/text/MessageFormat#MessageFormat(java.lang.String,%20java.util.Locale)" title="Reference documentation">Java documentation for <code>java.text.MessageFormat.MessageFormat(java.lang.String, java.util.Locale)</code>.</a>
</format>
</para>
<para>
Portions of this page are modifications based on work created and shared by the
<format type="text/html"><a href="https://developers.google.com/terms/site-policies" title="Android Open Source Project">Android Open Source Project</a></format>
and used according to terms described in the
<format type="text/html"><a href="https://creativecommons.org/licenses/by/2.5/" title="Creative Commons 2.5 Attribution License">Creative Commons 2.5 Attribution License.</a></format></para>
</remarks>
<since version="Added in API level 1" />
<exception cref="T:Java.Lang.IllegalArgumentException">if the pattern cannot be parsed.
</exception>
</Docs>
</Member>
<Member MemberName="ApplyPattern">
<MemberSignature Language="C#" Value="public virtual void ApplyPattern (string? pattern);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance void ApplyPattern(string pattern) cil managed" />
<MemberSignature Language="DocId" Value="M:Java.Text.MessageFormat.ApplyPattern(System.String)" />
<MemberSignature Language="F#" Value="abstract member ApplyPattern : string -> unit
override this.ApplyPattern : string -> unit" Usage="messageFormat.ApplyPattern pattern" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>Mono.Android</AssemblyName>
<AssemblyVersion>0.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute>
<AttributeName Language="C#">[Android.Runtime.Register("applyPattern", "(Ljava/lang/String;)V", "GetApplyPattern_Ljava_lang_String_Handler")]</AttributeName>
<AttributeName Language="F#">[<Android.Runtime.Register("applyPattern", "(Ljava/lang/String;)V", "GetApplyPattern_Ljava_lang_String_Handler")>]</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="pattern" Type="System.String" />
</Parameters>
<Docs>
<param name="pattern">the pattern for this message format</param>
<summary>Sets the pattern used by this message format.</summary>
<remarks>
<para>Sets the pattern used by this message format.
The method parses the pattern and creates a list of subformats
for the format elements contained in it.
Patterns and their interpretation are specified in the
class description.</para>
<para>
<format type="text/html">
<a href="https://developer.android.com/reference/java/text/MessageFormat#applyPattern(java.lang.String)" title="Reference documentation">Java documentation for <code>java.text.MessageFormat.applyPattern(java.lang.String)</code>.</a>
</format>
</para>
<para>
Portions of this page are modifications based on work created and shared by the
<format type="text/html"><a href="https://developers.google.com/terms/site-policies" title="Android Open Source Project">Android Open Source Project</a></format>
and used according to terms described in the
<format type="text/html"><a href="https://creativecommons.org/licenses/by/2.5/" title="Creative Commons 2.5 Attribution License">Creative Commons 2.5 Attribution License.</a></format></para>
</remarks>
<since version="Added in API level 1" />
<exception cref="T:Java.Lang.IllegalArgumentException">if the pattern cannot be parsed.
</exception>
</Docs>
</Member>
<Member MemberName="Format">
<MemberSignature Language="C#" Value="public static string? Format (string? pattern, params Java.Lang.Object[]? arguments);" />
<MemberSignature Language="ILAsm" Value=".method public static hidebysig string Format(string pattern, class Java.Lang.Object[] arguments) cil managed" />
<MemberSignature Language="DocId" Value="M:Java.Text.MessageFormat.Format(System.String,Java.Lang.Object[])" />
<MemberSignature Language="F#" Value="static member Format : string * Java.Lang.Object[] -> string" Usage="Java.Text.MessageFormat.Format (pattern, arguments)" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>Mono.Android</AssemblyName>
<AssemblyVersion>0.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute>
<AttributeName Language="C#">[Android.Runtime.Register("format", "(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;", "")]</AttributeName>
<AttributeName Language="F#">[<Android.Runtime.Register("format", "(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;", "")>]</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.String</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="pattern" Type="System.String" />
<Parameter Name="arguments" Type="Java.Lang.Object[]">
<Attributes>
<Attribute>
<AttributeName Language="C#">[System.ParamArray]</AttributeName>
<AttributeName Language="F#">[<System.ParamArray>]</AttributeName>
</Attribute>
</Attributes>
</Parameter>
</Parameters>
<Docs>
<param name="pattern">To be added.</param>
<param name="arguments">an array of objects to be formatted and substituted.</param>
<summary>Formats an array of objects and appends the <code>MessageFormat</code>'s
pattern, with format elements replaced by the formatted objects, to the
provided <code>StringBuffer</code>.</summary>
<returns>To be added.</returns>
<remarks>
<para>
<format type="text/html">
<a href="https://developer.android.com/reference/java/text/MessageFormat#format(java.lang.Object,%20java.lang.StringBuffer,%20java.text.FieldPosition)" title="Reference documentation">Java documentation for <code>java.text.MessageFormat.format(java.lang.Object, java.lang.StringBuffer, java.text.FieldPosition)</code>.</a>
</format>
</para>
<para>
Portions of this page are modifications based on work created and shared by the
<format type="text/html"><a href="https://developers.google.com/terms/site-policies" title="Android Open Source Project">Android Open Source Project</a></format>
and used according to terms described in the
<format type="text/html"><a href="https://creativecommons.org/licenses/by/2.5/" title="Creative Commons 2.5 Attribution License">Creative Commons 2.5 Attribution License.</a></format></para>
</remarks>
<since version="Added in API level 1" />
</Docs>
</Member>
<Member MemberName="Format">
<MemberSignature Language="C#" Value="public override sealed Java.Lang.StringBuffer? Format (Java.Lang.Object? arguments, Java.Lang.StringBuffer? result, Java.Text.FieldPosition? pos);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig virtual instance class Java.Lang.StringBuffer Format(class Java.Lang.Object arguments, class Java.Lang.StringBuffer result, class Java.Text.FieldPosition pos) cil managed" />
<MemberSignature Language="DocId" Value="M:Java.Text.MessageFormat.Format(Java.Lang.Object,Java.Lang.StringBuffer,Java.Text.FieldPosition)" />
<MemberSignature Language="F#" Value="override this.Format : Java.Lang.Object * Java.Lang.StringBuffer * Java.Text.FieldPosition -> Java.Lang.StringBuffer" Usage="messageFormat.Format (arguments, result, pos)" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>Mono.Android</AssemblyName>
<AssemblyVersion>0.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute>
<AttributeName Language="C#">[Android.Runtime.Register("format", "(Ljava/lang/Object;Ljava/lang/StringBuffer;Ljava/text/FieldPosition;)Ljava/lang/StringBuffer;", "")]</AttributeName>
<AttributeName Language="F#">[<Android.Runtime.Register("format", "(Ljava/lang/Object;Ljava/lang/StringBuffer;Ljava/text/FieldPosition;)Ljava/lang/StringBuffer;", "")>]</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>Java.Lang.StringBuffer</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="arguments" Type="Java.Lang.Object" />
<Parameter Name="result" Type="Java.Lang.StringBuffer" />
<Parameter Name="pos" Type="Java.Text.FieldPosition" />
</Parameters>
<Docs>
<param name="arguments">an array of objects to be formatted and substituted.</param>
<param name="result">where text is appended.</param>
<param name="pos">keeps track on the position of the first replaced argument
in the output string.</param>
<summary>Formats an array of objects and appends the <c>MessageFormat</c>'s
pattern, with format elements replaced by the formatted objects, to the
provided <c>StringBuffer</c>.</summary>
<returns>To be added.</returns>
<remarks>
<para>Formats an array of objects and appends the <c>MessageFormat</c>'s
pattern, with format elements replaced by the formatted objects, to the
provided <c>StringBuffer</c>.
This is equivalent to
<blockquote>
<c>{@link #format(java.lang.Object[], java.lang.StringBuffer, java.text.FieldPosition) format}((Object[]) arguments, result, pos)</c></blockquote></para>
<para>
<format type="text/html">
<a href="https://developer.android.com/reference/java/text/MessageFormat#format(java.lang.Object,%20java.lang.StringBuffer,%20java.text.FieldPosition)" title="Reference documentation">Java documentation for <code>java.text.MessageFormat.format(java.lang.Object, java.lang.StringBuffer, java.text.FieldPosition)</code>.</a>
</format>
</para>
<para>
Portions of this page are modifications based on work created and shared by the
<format type="text/html"><a href="https://developers.google.com/terms/site-policies" title="Android Open Source Project">Android Open Source Project</a></format>
and used according to terms described in the
<format type="text/html"><a href="https://creativecommons.org/licenses/by/2.5/" title="Creative Commons 2.5 Attribution License">Creative Commons 2.5 Attribution License.</a></format></para>
</remarks>
<since version="Added in API level 1" />
<exception cref="T:Java.Lang.ClassCastException">if <c>object</c> is not an array of <c>Object</c>.
</exception>
</Docs>
</Member>
<Member MemberName="Format">
<MemberSignature Language="C#" Value="public Java.Lang.StringBuffer? Format (Java.Lang.Object[]? arguments, Java.Lang.StringBuffer? result, Java.Text.FieldPosition? pos);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig instance class Java.Lang.StringBuffer Format(class Java.Lang.Object[] arguments, class Java.Lang.StringBuffer result, class Java.Text.FieldPosition pos) cil managed" />
<MemberSignature Language="DocId" Value="M:Java.Text.MessageFormat.Format(Java.Lang.Object[],Java.Lang.StringBuffer,Java.Text.FieldPosition)" />
<MemberSignature Language="F#" Value="override this.Format : Java.Lang.Object[] * Java.Lang.StringBuffer * Java.Text.FieldPosition -> Java.Lang.StringBuffer" Usage="messageFormat.Format (arguments, result, pos)" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>Mono.Android</AssemblyName>
<AssemblyVersion>0.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute>
<AttributeName Language="C#">[Android.Runtime.Register("format", "([Ljava/lang/Object;Ljava/lang/StringBuffer;Ljava/text/FieldPosition;)Ljava/lang/StringBuffer;", "")]</AttributeName>
<AttributeName Language="F#">[<Android.Runtime.Register("format", "([Ljava/lang/Object;Ljava/lang/StringBuffer;Ljava/text/FieldPosition;)Ljava/lang/StringBuffer;", "")>]</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>Java.Lang.StringBuffer</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="arguments" Type="Java.Lang.Object[]" />
<Parameter Name="result" Type="Java.Lang.StringBuffer" />
<Parameter Name="pos" Type="Java.Text.FieldPosition" />
</Parameters>
<Docs>
<param name="arguments">an array of objects to be formatted and substituted.</param>
<param name="result">where text is appended.</param>
<param name="pos">keeps track on the position of the first replaced argument
in the output string.</param>
<summary>Formats an array of objects and appends the <c>MessageFormat</c>'s
pattern, with format elements replaced by the formatted objects, to the
provided <c>StringBuffer</c>.</summary>
<returns>the string buffer passed in as <c>result</c>, with formatted
text appended</returns>
<remarks>
<para>Formats an array of objects and appends the <c>MessageFormat</c>'s
pattern, with format elements replaced by the formatted objects, to the
provided <c>StringBuffer</c>.</para>
<para>The text substituted for the individual format elements is derived from
the current subformat of the format element and the
<c>arguments</c> element at the format element's argument index
as indicated by the first matching line of the following table. An
argument is <i>unavailable</i> if <c>arguments</c> is
<c>null</c> or has fewer than argumentIndex+1 elements.
<table class="plain">
<caption style="display:none">Examples of subformat,argument,and formatted text</caption>
<thead>
<tr>
<th scope="col">Subformat
<th scope="col">Argument
<th scope="col">Formatted Text
</thead>
<tbody>
<tr>
<th scope="row" style="text-weight-normal" rowspan=2><i>any</i><th scope="row" style="text-weight-normal"><i>unavailable</i><td><c>"{" + argumentIndex + "}"</c><tr>
<th scope="row" style="text-weight-normal"><c>null</c><td><c>"null"</c><tr>
<th scope="row" style="text-weight-normal"><c>instanceof ChoiceFormat</c><th scope="row" style="text-weight-normal"><i>any</i><td><c>subformat.format(argument).indexOf('{') &gt;= 0 ?<br>
(new MessageFormat(subformat.format(argument), getLocale())).format(argument) :
subformat.format(argument)</c><tr>
<th scope="row" style="text-weight-normal"><c>!= null</c><th scope="row" style="text-weight-normal"><i>any</i><td><c>subformat.format(argument)</c><tr>
<th scope="row" style="text-weight-normal" rowspan=4><c>null</c><th scope="row" style="text-weight-normal"><c>instanceof Number</c><td><c>NumberFormat.getInstance(getLocale()).format(argument)</c><tr>
<th scope="row" style="text-weight-normal"><c>instanceof Date</c><td><c>DateFormat.getDateTimeInstance(DateFormat.SHORT, DateFormat.SHORT, getLocale()).format(argument)</c><tr>
<th scope="row" style="text-weight-normal"><c>instanceof String</c><td><c>argument</c><tr>
<th scope="row" style="text-weight-normal"><i>any</i><td><c>argument.toString()</c></tbody>
</table></para>
<para>If <c>pos</c> is non-null, and refers to
<c>Field.ARGUMENT</c>, the location of the first formatted
string will be returned.</para>
<para>
<format type="text/html">
<a href="https://developer.android.com/reference/java/text/MessageFormat#format(java.lang.Object[],%20java.lang.StringBuffer,%20java.text.FieldPosition)" title="Reference documentation">Java documentation for <code>java.text.MessageFormat.format(java.lang.Object[], java.lang.StringBuffer, java.text.FieldPosition)</code>.</a>
</format>
</para>
<para>
Portions of this page are modifications based on work created and shared by the
<format type="text/html"><a href="https://developers.google.com/terms/site-policies" title="Android Open Source Project">Android Open Source Project</a></format>
and used according to terms described in the
<format type="text/html"><a href="https://creativecommons.org/licenses/by/2.5/" title="Creative Commons 2.5 Attribution License">Creative Commons 2.5 Attribution License.</a></format></para>
</remarks>
<since version="Added in API level 1" />
</Docs>
</Member>
<Member MemberName="GetFormats">
<MemberSignature Language="C#" Value="public virtual Java.Text._Format[]? GetFormats ();" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance class Java.Text._Format[] GetFormats() cil managed" />
<MemberSignature Language="DocId" Value="M:Java.Text.MessageFormat.GetFormats" />
<MemberSignature Language="F#" Value="abstract member GetFormats : unit -> Java.Text._Format[]
override this.GetFormats : unit -> Java.Text._Format[]" Usage="messageFormat.GetFormats " />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>Mono.Android</AssemblyName>
<AssemblyVersion>0.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute>
<AttributeName Language="C#">[Android.Runtime.Register("getFormats", "()[Ljava/text/Format;", "GetGetFormatsHandler")]</AttributeName>
<AttributeName Language="F#">[<Android.Runtime.Register("getFormats", "()[Ljava/text/Format;", "GetGetFormatsHandler")>]</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>Java.Text._Format[]</ReturnType>
</ReturnValue>
<Parameters />
<Docs>
<summary>Gets the formats used for the format elements in the
previously set pattern string.</summary>
<returns>the formats used for the format elements in the pattern</returns>
<remarks>
<para>Gets the formats used for the format elements in the
previously set pattern string.
The order of formats in the returned array corresponds to
the order of format elements in the pattern string.</para>
<para>Since the order of format elements in a pattern string often
changes during localization, it's generally better to use the
<c>#getFormatsByArgumentIndex getFormatsByArgumentIndex</c>
method, which assumes an order of formats corresponding to the
order of elements in the <c>arguments</c> array passed to
the <c>format</c> methods or the result array returned by
the <c>parse</c> methods.</para>
<para>
<format type="text/html">
<a href="https://developer.android.com/reference/java/text/MessageFormat#getFormats()" title="Reference documentation">Java documentation for <code>java.text.MessageFormat.getFormats()</code>.</a>
</format>
</para>
<para>
Portions of this page are modifications based on work created and shared by the
<format type="text/html"><a href="https://developers.google.com/terms/site-policies" title="Android Open Source Project">Android Open Source Project</a></format>
and used according to terms described in the
<format type="text/html"><a href="https://creativecommons.org/licenses/by/2.5/" title="Creative Commons 2.5 Attribution License">Creative Commons 2.5 Attribution License.</a></format></para>
</remarks>
<since version="Added in API level 1" />
</Docs>
</Member>
<Member MemberName="GetFormatsByArgumentIndex">
<MemberSignature Language="C#" Value="public virtual Java.Text._Format[]? GetFormatsByArgumentIndex ();" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance class Java.Text._Format[] GetFormatsByArgumentIndex() cil managed" />
<MemberSignature Language="DocId" Value="M:Java.Text.MessageFormat.GetFormatsByArgumentIndex" />
<MemberSignature Language="F#" Value="abstract member GetFormatsByArgumentIndex : unit -> Java.Text._Format[]
override this.GetFormatsByArgumentIndex : unit -> Java.Text._Format[]" Usage="messageFormat.GetFormatsByArgumentIndex " />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>Mono.Android</AssemblyName>
<AssemblyVersion>0.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute>
<AttributeName Language="C#">[Android.Runtime.Register("getFormatsByArgumentIndex", "()[Ljava/text/Format;", "GetGetFormatsByArgumentIndexHandler")]</AttributeName>
<AttributeName Language="F#">[<Android.Runtime.Register("getFormatsByArgumentIndex", "()[Ljava/text/Format;", "GetGetFormatsByArgumentIndexHandler")>]</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>Java.Text._Format[]</ReturnType>
</ReturnValue>
<Parameters />
<Docs>
<summary>Gets the formats used for the values passed into
<c>format</c> methods or returned from <c>parse</c>
methods.</summary>
<returns>the formats used for the arguments within the pattern</returns>
<remarks>
<para>Gets the formats used for the values passed into
<c>format</c> methods or returned from <c>parse</c>
methods. The indices of elements in the returned array
correspond to the argument indices used in the previously set
pattern string.
The order of formats in the returned array thus corresponds to
the order of elements in the <c>arguments</c> array passed
to the <c>format</c> methods or the result array returned
by the <c>parse</c> methods.</para>
<para>If an argument index is used for more than one format element
in the pattern string, then the format used for the last such
format element is returned in the array. If an argument index
is not used for any format element in the pattern string, then
null is returned in the array.</para>
<para>Added in 1.4.</para>
<para>
<format type="text/html">
<a href="https://developer.android.com/reference/java/text/MessageFormat#getFormatsByArgumentIndex()" title="Reference documentation">Java documentation for <code>java.text.MessageFormat.getFormatsByArgumentIndex()</code>.</a>
</format>
</para>
<para>
Portions of this page are modifications based on work created and shared by the
<format type="text/html"><a href="https://developers.google.com/terms/site-policies" title="Android Open Source Project">Android Open Source Project</a></format>
and used according to terms described in the
<format type="text/html"><a href="https://creativecommons.org/licenses/by/2.5/" title="Creative Commons 2.5 Attribution License">Creative Commons 2.5 Attribution License.</a></format></para>
</remarks>
<since version="Added in API level 1" />
</Docs>
</Member>
<Member MemberName="JniPeerMembers">
<MemberSignature Language="C#" Value="public override Java.Interop.JniPeerMembers JniPeerMembers { get; }" />
<MemberSignature Language="ILAsm" Value=".property instance class Java.Interop.JniPeerMembers JniPeerMembers" />
<MemberSignature Language="DocId" Value="P:Java.Text.MessageFormat.JniPeerMembers" />
<MemberSignature Language="F#" Value="member this.JniPeerMembers : Java.Interop.JniPeerMembers" Usage="Java.Text.MessageFormat.JniPeerMembers" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>Mono.Android</AssemblyName>
<AssemblyVersion>0.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute>
<AttributeName Language="C#">[System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]</AttributeName>
<AttributeName Language="F#">[<System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)>]</AttributeName>
</Attribute>
<Attribute>
<AttributeName Language="C#">[System.Diagnostics.DebuggerBrowsable(System.Diagnostics.DebuggerBrowsableState.Never)]</AttributeName>
<AttributeName Language="F#">[<System.Diagnostics.DebuggerBrowsable(System.Diagnostics.DebuggerBrowsableState.Never)>]</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>Java.Interop.JniPeerMembers</ReturnType>
</ReturnValue>
<Docs>
<summary>To be added.</summary>
<value>To be added.</value>
<remarks>
<para>Portions of this page are modifications based on work created and shared by the <format type="text/html"><a href="https://developers.google.com/terms/site-policies" title="Android Open Source Project">Android Open Source Project</a></format> and used according to terms described in the <format type="text/html"><a href="https://creativecommons.org/licenses/by/2.5/" title="Creative Commons 2.5 Attribution License">Creative Commons 2.5 Attribution License.</a></format></para>
</remarks>
</Docs>
</Member>
<Member MemberName="Locale">
<MemberSignature Language="C#" Value="public virtual Java.Util.Locale? Locale { get; set; }" />
<MemberSignature Language="ILAsm" Value=".property instance class Java.Util.Locale Locale" />
<MemberSignature Language="DocId" Value="P:Java.Text.MessageFormat.Locale" />
<MemberSignature Language="F#" Value="member this.Locale : Java.Util.Locale with get, set" Usage="Java.Text.MessageFormat.Locale" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>Mono.Android</AssemblyName>
<AssemblyVersion>0.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute>
<AttributeName Language="C#">[get: Android.Runtime.Register("getLocale", "()Ljava/util/Locale;", "GetGetLocaleHandler")]</AttributeName>
<AttributeName Language="F#">[<get: Android.Runtime.Register("getLocale", "()Ljava/util/Locale;", "GetGetLocaleHandler")>]</AttributeName>
</Attribute>
<Attribute>
<AttributeName Language="C#">[set: Android.Runtime.Register("setLocale", "(Ljava/util/Locale;)V", "GetSetLocale_Ljava_util_Locale_Handler")]</AttributeName>
<AttributeName Language="F#">[<set: Android.Runtime.Register("setLocale", "(Ljava/util/Locale;)V", "GetSetLocale_Ljava_util_Locale_Handler")>]</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>Java.Util.Locale</ReturnType>
</ReturnValue>
<Docs>
<param name="locale">the locale to be used when creating or comparing subformats</param>
<summary>Gets the locale that's used when creating or comparing subformats. -or- Sets the locale to be used when creating or comparing subformats.</summary>
<value>the locale used when creating or comparing subformats</value>
<remarks>
<para>Property getter documentation:</para>
<para>Gets the locale that's used when creating or comparing subformats.</para>
<para>
<format type="text/html">
<a href="https://developer.android.com/reference/java/text/MessageFormat#getLocale()" title="Reference documentation">Java documentation for <code>java.text.MessageFormat.getLocale()</code>.</a>
</format>
</para>
<para>Property setter documentation:</para>
<para>Sets the locale to be used when creating or comparing subformats.
This affects subsequent calls
<ul>
<li>to the <c>#applyPattern applyPattern</c>
and <c>#toPattern toPattern</c> methods if format elements specify
a format type and therefore have the subformats created in the
<c>applyPattern</c> method, as well as
<li>to the <c>format</c> and
<c>#formatToCharacterIterator formatToCharacterIterator</c> methods
if format elements do not specify a format type and therefore have
the subformats created in the formatting methods.
</ul>
Subformats that have already been created are not affected.</para>
<para>
<format type="text/html">
<a href="https://developer.android.com/reference/java/text/MessageFormat#setLocale(java.util.Locale)" title="Reference documentation">Java documentation for <code>java.text.MessageFormat.setLocale(java.util.Locale)</code>.</a>
</format>
</para>
<para>
Portions of this page are modifications based on work created and shared by the
<format type="text/html"><a href="https://developers.google.com/terms/site-policies" title="Android Open Source Project">Android Open Source Project</a></format>
and used according to terms described in the
<format type="text/html"><a href="https://creativecommons.org/licenses/by/2.5/" title="Creative Commons 2.5 Attribution License">Creative Commons 2.5 Attribution License.</a></format></para>
</remarks>
<since version="Added in API level 1" />
</Docs>
</Member>
<Member MemberName="Parse">
<MemberSignature Language="C#" Value="public virtual Java.Lang.Object[]? Parse (string? source);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance class Java.Lang.Object[] Parse(string source) cil managed" />
<MemberSignature Language="DocId" Value="M:Java.Text.MessageFormat.Parse(System.String)" />
<MemberSignature Language="F#" Value="abstract member Parse : string -> Java.Lang.Object[]
override this.Parse : string -> Java.Lang.Object[]" Usage="messageFormat.Parse source" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>Mono.Android</AssemblyName>
<AssemblyVersion>0.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute>
<AttributeName Language="C#">[Android.Runtime.Register("parse", "(Ljava/lang/String;)[Ljava/lang/Object;", "GetParse_Ljava_lang_String_Handler")]</AttributeName>
<AttributeName Language="F#">[<Android.Runtime.Register("parse", "(Ljava/lang/String;)[Ljava/lang/Object;", "GetParse_Ljava_lang_String_Handler")>]</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>Java.Lang.Object[]</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="source" Type="System.String" />
</Parameters>
<Docs>
<param name="source">A <c>String</c> whose beginning should be parsed.</param>
<summary>Parses text from the beginning of the given string to produce an object
array.</summary>
<returns>An <c>Object</c> array parsed from the string.</returns>
<remarks>
<para>Parses text from the beginning of the given string to produce an object
array.
The method may not use the entire text of the given string.</para>
<para>See the <c>#parse(String, ParsePosition)</c> method for more information
on message parsing.</para>
<para>
<format type="text/html">
<a href="https://developer.android.com/reference/java/text/MessageFormat#parse(java.lang.String)" title="Reference documentation">Java documentation for <code>java.text.MessageFormat.parse(java.lang.String)</code>.</a>
</format>
</para>
<para>
Portions of this page are modifications based on work created and shared by the
<format type="text/html"><a href="https://developers.google.com/terms/site-policies" title="Android Open Source Project">Android Open Source Project</a></format>
and used according to terms described in the
<format type="text/html"><a href="https://creativecommons.org/licenses/by/2.5/" title="Creative Commons 2.5 Attribution License">Creative Commons 2.5 Attribution License.</a></format></para>
</remarks>
<since version="Added in API level 1" />
<exception cref="T:Java.Text.ParseException">if an error occurs during parsing.
</exception>
</Docs>
</Member>
<Member MemberName="Parse">
<MemberSignature Language="C#" Value="public virtual Java.Lang.Object[]? Parse (string? source, Java.Text.ParsePosition? pos);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance class Java.Lang.Object[] Parse(string source, class Java.Text.ParsePosition pos) cil managed" />
<MemberSignature Language="DocId" Value="M:Java.Text.MessageFormat.Parse(System.String,Java.Text.ParsePosition)" />
<MemberSignature Language="F#" Value="abstract member Parse : string * Java.Text.ParsePosition -> Java.Lang.Object[]
override this.Parse : string * Java.Text.ParsePosition -> Java.Lang.Object[]" Usage="messageFormat.Parse (source, pos)" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>Mono.Android</AssemblyName>
<AssemblyVersion>0.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute>
<AttributeName Language="C#">[Android.Runtime.Register("parse", "(Ljava/lang/String;Ljava/text/ParsePosition;)[Ljava/lang/Object;", "GetParse_Ljava_lang_String_Ljava_text_ParsePosition_Handler")]</AttributeName>
<AttributeName Language="F#">[<Android.Runtime.Register("parse", "(Ljava/lang/String;Ljava/text/ParsePosition;)[Ljava/lang/Object;", "GetParse_Ljava_lang_String_Ljava_text_ParsePosition_Handler")>]</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>Java.Lang.Object[]</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="source" Type="System.String" />
<Parameter Name="pos" Type="Java.Text.ParsePosition" />
</Parameters>
<Docs>
<param name="source">the string to parse</param>
<param name="pos">the parse position</param>
<summary>Parses the string.</summary>
<returns>an array of parsed objects</returns>
<remarks>
<para>Parses the string.</para>
<para>Caveats: The parse may fail in a number of circumstances.
For example:
<ul>
<li>If one of the arguments does not occur in the pattern.
<li>If the format of an argument loses information, such as
with a choice format where a large number formats to "many".
<li>Does not yet handle recursion (where
the substituted strings contain {n} references.)
<li>Will not always find a match (or the correct match)
if some part of the parse is ambiguous.
For example, if the pattern "{1},{2}" is used with the
string arguments {"a,b", "c"}, it will format as "a,b,c".
When the result is parsed, it will return {"a", "b,c"}.
<li>If a single argument is parsed more than once in the string,
then the later parse wins.
</ul>
When the parse fails, use ParsePosition.getErrorIndex() to find out
where in the string the parsing failed. The returned error
index is the starting offset of the sub-patterns that the string
is comparing with. For example, if the parsing string "AAA {0} BBB"
is comparing against the pattern "AAD {0} BBB", the error index is
0. When an error occurs, the call to this method will return null.
If the source is null, return an empty array.</para>
<para>
<format type="text/html">
<a href="https://developer.android.com/reference/java/text/MessageFormat#parse(java.lang.String,%20java.text.ParsePosition)" title="Reference documentation">Java documentation for <code>java.text.MessageFormat.parse(java.lang.String, java.text.ParsePosition)</code>.</a>
</format>
</para>
<para>
Portions of this page are modifications based on work created and shared by the
<format type="text/html"><a href="https://developers.google.com/terms/site-policies" title="Android Open Source Project">Android Open Source Project</a></format>
and used according to terms described in the
<format type="text/html"><a href="https://creativecommons.org/licenses/by/2.5/" title="Creative Commons 2.5 Attribution License">Creative Commons 2.5 Attribution License.</a></format></para>
</remarks>
<since version="Added in API level 1" />
</Docs>
</Member>
<Member MemberName="ParseObject">
<MemberSignature Language="C#" Value="public override Java.Lang.Object? ParseObject (string? source, Java.Text.ParsePosition? pos);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig virtual instance class Java.Lang.Object ParseObject(string source, class Java.Text.ParsePosition pos) cil managed" />
<MemberSignature Language="DocId" Value="M:Java.Text.MessageFormat.ParseObject(System.String,Java.Text.ParsePosition)" />
<MemberSignature Language="F#" Value="override this.ParseObject : string * Java.Text.ParsePosition -> Java.Lang.Object" Usage="messageFormat.ParseObject (source, pos)" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>Mono.Android</AssemblyName>
<AssemblyVersion>0.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute>
<AttributeName Language="C#">[Android.Runtime.Register("parseObject", "(Ljava/lang/String;Ljava/text/ParsePosition;)Ljava/lang/Object;", "GetParseObject_Ljava_lang_String_Ljava_text_ParsePosition_Handler")]</AttributeName>
<AttributeName Language="F#">[<Android.Runtime.Register("parseObject", "(Ljava/lang/String;Ljava/text/ParsePosition;)Ljava/lang/Object;", "GetParseObject_Ljava_lang_String_Ljava_text_ParsePosition_Handler")>]</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>Java.Lang.Object</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="source" Type="System.String" />
<Parameter Name="pos" Type="Java.Text.ParsePosition" />
</Parameters>
<Docs>
<param name="source">A <c>String</c>, part of which should be parsed.</param>
<param name="pos">A <c>ParsePosition</c> object with index and error
index information as described above.</param>
<summary>Parses text from a string to produce an object array.</summary>
<returns>An <c>Object</c> array parsed from the string. In case of
error, returns null.</returns>
<remarks>
<para>Parses text from a string to produce an object array.</para>
<para>The method attempts to parse text starting at the index given by
<c>pos</c>.
If parsing succeeds, then the index of <c>pos</c> 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 array is returned. The updated <c>pos</c> can be used to
indicate the starting point for the next call to this method.
If an error occurs, then the index of <c>pos</c> is not
changed, the error index of <c>pos</c> is set to the index of
the character where the error occurred, and null is returned.</para>
<para>See the <c>#parse(String, ParsePosition)</c> method for more information
on message parsing.</para>
<para>
<format type="text/html">
<a href="https://developer.android.com/reference/java/text/MessageFormat#parseObject(java.lang.String,%20java.text.ParsePosition)" title="Reference documentation">Java documentation for <code>java.text.MessageFormat.parseObject(java.lang.String, java.text.ParsePosition)</code>.</a>
</format>
</para>
<para>
Portions of this page are modifications based on work created and shared by the
<format type="text/html"><a href="https://developers.google.com/terms/site-policies" title="Android Open Source Project">Android Open Source Project</a></format>
and used according to terms described in the
<format type="text/html"><a href="https://creativecommons.org/licenses/by/2.5/" title="Creative Commons 2.5 Attribution License">Creative Commons 2.5 Attribution License.</a></format></para>
</remarks>
<since version="Added in API level 1" />
</Docs>
</Member>
<Member MemberName="SetFormat">
<MemberSignature Language="C#" Value="public virtual void SetFormat (int formatElementIndex, Java.Text._Format? newFormat);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance void SetFormat(int32 formatElementIndex, class Java.Text._Format newFormat) cil managed" />
<MemberSignature Language="DocId" Value="M:Java.Text.MessageFormat.SetFormat(System.Int32,Java.Text._Format)" />