Compartilhar via


Collator.SetReorderCodes(Int32[]) Method

Definition

Sets the reordering codes for this collator.

[Android.Runtime.Register("setReorderCodes", "([I)V", "GetSetReorderCodes_arrayIHandler", ApiSince=24)]
public virtual void SetReorderCodes (params int[]? order);
[<Android.Runtime.Register("setReorderCodes", "([I)V", "GetSetReorderCodes_arrayIHandler", ApiSince=24)>]
abstract member SetReorderCodes : int[] -> unit
override this.SetReorderCodes : int[] -> unit

Parameters

order
Int32[]

the reordering codes to apply to this collator; if this is null or an empty array then this clears any existing reordering

Attributes

Remarks

Sets the reordering codes for this collator. Collation reordering allows scripts and some other groups of characters to be moved relative to each other. This reordering is done on top of the DUCET/CLDR standard collation order. Reordering can specify groups to be placed at the start and/or the end of the collation order. These groups are specified using UScript codes and Collator.ReorderCodes entries.

By default, reordering codes specified for the start of the order are placed in the order given after several special non-script blocks. These special groups of characters are space, punctuation, symbol, currency, and digit. These special groups are represented with Collator.ReorderCodes entries. Script groups can be intermingled with these special non-script groups if those special groups are explicitly specified in the reordering.

The special code Collator.ReorderCodes#OTHERS OTHERS stands for any script that is not explicitly mentioned in the list of reordering codes given. Anything that is after OTHERS will go at the very end of the reordering in the order given.

The special reorder code Collator.ReorderCodes#DEFAULT DEFAULT will reset the reordering for this collator to the default for this collator. The default reordering may be the DUCET/CLDR order or may be a reordering that was specified when this collator was created from resource data or from rules. The DEFAULT code <b>must</b> be the sole code supplied when it is used. If not, then an IllegalArgumentException will be thrown.

The special reorder code Collator.ReorderCodes#NONE NONE will remove any reordering for this collator. The result of setting no reordering will be to have the DUCET/CLDR ordering used. The NONE code <b>must</b> be the sole code supplied when it is used.

Java documentation for android.icu.text.Collator.setReorderCodes(int...).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to