RuleBasedCollator.GetCollationKey(String) メソッド

定義

この RuleBasedCollator から引数 String ソースの照合順序キーを取得します。

[Android.Runtime.Register("getCollationKey", "(Ljava/lang/String;)Landroid/icu/text/CollationKey;", "", ApiSince=24)]
public override Android.Icu.Text.CollationKey? GetCollationKey(string? source);
[<Android.Runtime.Register("getCollationKey", "(Ljava/lang/String;)Landroid/icu/text/CollationKey;", "", ApiSince=24)>]
override this.GetCollationKey : string -> Android.Icu.Text.CollationKey

パラメーター

source
String

照合順序キーに変換する文字列を指定します。

返品

この RuleBasedCollator の照合順序規則に基づく、指定された文字列の CollationKey。 ソース文字列が null の場合は、null CollationKey が返されます。

属性

注釈

この RuleBasedCollator から引数 String ソースの照合順序キーを取得します。

一般的な推奨事項: <br> 同じ文字列に対して複数回比較を行う場合は、文字列の CollationKey を生成し、比較に CollationKey.compareTo(CollationKey) を使用する方が効率的です。 各文字列が 1 回だけ比較される場合、RuleBasedCollator.compare(String, String) メソッドを使用するとパフォーマンスが向上します。

CollationKeys の説明については、クラスのドキュメントを参照してください。

Javaドキュメント。

このページの一部は、によって作成および共有され、に記載されている条件に従って使用される作業に基づく変更です。

適用対象